/

CVE-2026-81849

Severity:

HIGH RISK

(8.8)

Path Traversal (CWE-23) in AWS SSM DownloadContent Plugin

CVE-2026-81849

Awaiting Analysis

Vulnerability type

Category:

Path Traversal

CWE:

CWE-23

Impact:

Privileged arbitrary file write with potential root-level code execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability in the AWS Systems Manager Agent aws:downloadContent plugin may allow an authenticated user with restricted ssm:SendCommand access to write files outside the intended download directory. Because the plugin performs these writes with root privileges, overwriting sensitive files could potentially enable arbitrary code execution.

Affected context

The issue affects deployments using the AWS Systems Manager Agent aws:downloadContent plugin to retrieve objects from Amazon S3. Risk arises when an authenticated principal can invoke the permitted AWS-DownloadContent document and the plugin does not sufficiently constrain object-derived filenames to the intended download directory.

Exploit preconditions

  • Attack surface: The AWS Systems Manager Agent aws:downloadContent plugin
  • Required access: An authenticated remote user with permission to invoke

ssm:SendCommand for the AWS-DownloadContent document

  • Trigger point: Processing S3 object keys while downloading content
  • Why exploitation is possible: Insufficient pathname restrictions may allow

object-derived paths to resolve outside the designated download directory,

with the agent performing the write using root privileges

Why this happens

The vulnerability is caused by improper limitation of a pathname to a restricted directory. The plugin derives a local destination from attacker- influenceable S3 object metadata without reliably enforcing that the resolved path remains within the authorized download directory. This behavior maps to CWE-23, Path Traversal, where path components can escape an intended directory boundary and reach unintended filesystem locations.

Potential impact

  • An attacker may write arbitrary files outside the intended download directory
  • Sensitive system or application files could be overwritten
  • The SSM-managed host could experience integrity or availability impacts
  • Arbitrary code could execute with root privileges if a suitable sensitive file is overwritten
  • The host could be used for further unauthorized activity

General mitigation guidance

Mitigation generally focuses on enforcing filesystem boundaries independently

of user-controlled object names.

Common defensive patterns include:

  • Canonicalizing and validating destination paths before every write
  • Rejecting traversal components, absolute paths, and paths that resolve outside

an explicitly authorized directory

  • Constructing destinations from trusted identifiers rather than raw object keys
  • Applying filesystem permissions and service-account privileges that limit the

consequences of an unexpected write

  • Separating downloaded content from executable or security-sensitive paths
  • Using patched, vendor-supported agent releases through established update

processes

  • Restricting ssm:SendCommand permissions and applying least-privilege IAM

policies

How teams detect issues like this

Detection approaches may include:

  • Static analysis for path joins or file writes that use S3 object keys or other

external names without canonicalization and containment checks

  • Code review checks for absolute paths, traversal segments, and missing

post-resolution directory-boundary validation

  • Runtime monitoring of the SSM Agent for writes outside approved download

locations

  • File-integrity monitoring for unexpected changes to system, service, or startup

configuration files

  • IAM policy reviews and enforcement rules limiting command-document access to

required principals

  • Automated security scanning and code-review tools that identify path

traversal patterns

Sources

SourceLink
aws.amazon.comaws.amazon.com/security/security-bulletins/2026-091-aws/
github.comgithub.com/aws/amazon-ssm-agent/releases/tag/3.3.4515.0

Frequently asked

questions

Exploitation generally requires an authenticated principal that can invoke

ssm:SendCommand with access to the AWS-DownloadContent document. The relevant

permission scope may be restricted, but it still provides the attack surface.

No. The described scenario requires authenticated access through AWS Systems

Manager command execution and a managed instance running the affected plugin.

Ensure every downloaded destination is canonicalized and verified to remain

inside a trusted directory, while also reducing the agent's filesystem and

operating privileges where operationally possible.

Treat object keys and filenames as untrusted input, enforce strict IAM

permissions, monitor writes to sensitive paths, and use automated checks for

path-boundary validation in file-handling code.

Find out what's already
exploitable in your codebase.