LiveActive security incident?Get immediate response
CVE Record

CVE-2022-31159: Partial Path Traversal in com.amazonaws:aws-java-sdk-s3

The AWS SDK for Java enables Java developers to work with Amazon Web Services. A partial-path traversal issue exists within the `downloadDirectory` method in the AWS S3 TransferManager component of the AWS SDK for Java v1 prior to version 1.12.261. Applications using the SDK control the `destinationDirectory` argument, but S3 object keys are determined by the application that uploaded the objects. The `downloadDirectory` method allows the caller to pass a filesystem object in the object key but contained an issue in the validation logic for the key name. A knowledgeable actor could bypass the validation logic by including a UNIX double-dot in the bucket key. Under certain conditions, this could permit them to retrieve a directory from their S3 bucket that is one level up in the filesystem from their working directory. This issue’s scope is limited to directories whose name prefix matches the destinationDirectory. E.g. for destination directory`/tmp/foo`, the actor can cause a download to `/tmp/foo-bar`, but not `/tmp/bar`. If `com.amazonaws.services.s3.transfer.TransferManager::downloadDirectory` is used to download an untrusted buckets contents, the contents of that bucket can be written outside of the intended destination directory. Version 1.12.261 contains a patch for this issue. As a workaround, when calling `com.amazonaws.services.s3.transfer.TransferManager::downloadDirectory`, pass a `KeyFilter` that forbids `S3ObjectSummary` objects that `getKey` method return a string containing the substring `..` .

HighCVSS 7.9Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

This vulnerability affects Java applications that use AWS SDK for Java v1 to download S3 directories. Malicious or untrusted S3 object names containing double-dot path elements could make files land just outside the intended destination directory, risking sensitive file overwrite or data exposure.

Executive priority

Prioritize remediation where Java services download user-controlled or partner-controlled S3 bucket contents. The issue is high severity but conditional, so urgency depends on whether untrusted object keys reach downloadDirectory.

Technical view

AWS SDK for Java v1 before 1.12.261 has CWE-22 partial path traversal in S3 TransferManager.downloadDirectory. The flawed key validation can allow S3 object keys containing UNIX double-dot sequences to escape the intended directory under prefix-matching conditions.

Likely exposure

Exposure is likely limited to applications using com.amazonaws:aws-java-sdk-s3 version 1.12.260 or earlier and calling TransferManager.downloadDirectory on bucket contents where object keys may be untrusted or attacker influenced.

Exploitation context

The supplied sources do not report active exploitation, and CISA KEV status is false. Exploitation requires specific application behavior, influence over S3 object keys, and the documented partial-prefix filesystem condition.

Researcher notes

The traversal is partial: for destination /tmp/foo, sources state writing to /tmp/foo-bar may be possible, but not /tmp/bar. The patch is version 1.12.261; the documented workaround is a KeyFilter blocking keys containing '..'.

Mitigation direction

  • Upgrade AWS SDK for Java v1 to version 1.12.261 or later.
  • Add a KeyFilter rejecting S3ObjectSummary.getKey values containing '..'.
  • Avoid using downloadDirectory with untrusted bucket contents until remediated.
  • Review AWS advisory guidance for any application-specific constraints.

Validation and detection

  • Inventory com.amazonaws:aws-java-sdk-s3 dependency versions across Java services.
  • Search code for TransferManager.downloadDirectory usage.
  • Confirm whether downloaded S3 object keys can be externally controlled.
  • Verify any KeyFilter blocks keys containing '..'.
  • Add regression tests for unsafe S3 key rejection.
Prepared
Confidence
high
Sources
3

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-22: File access and web shell behavior lookup

File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

File access behavior lookup

The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2022-31159 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.9 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:L

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
2Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.9CVSS 3.1HighCVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:L1.36Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

7.9High
CVSS 3.1 vector shape for CVE-2022-31159Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:L

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
awsaws-sdk-java<= 1.12.260Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-22 · source CWE mapping

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.