CVE-2022-31159

HIGH

AWS SDK for Java <1.12.261 - Path Traversal

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2022-31159. PoCs published by shoucheng3.

AI-analyzed exploit summary This repository appears to be a fork or snapshot of the AWS SDK for Java, specifically highlighting CVE-2022-31159. However, the provided files and README do not contain exploit code or a proof-of-concept. Instead, they include standard SDK files and documentation.

Description

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 `..` .

Exploits (1)

nomisec WRITEUP
by shoucheng3 · poc
https://github.com/shoucheng3/aws__aws-sdk-java_CVE-2022-31159_1-12-2600

This repository appears to be a fork or snapshot of the AWS SDK for Java, specifically highlighting CVE-2022-31159. However, the provided files and README do not contain exploit code or a proof-of-concept. Instead, they include standard SDK files and documentation.

Classification
Writeup 90%
Attack Type
Other
Complexity
Trivial
Reliability
Theoretical
Target: AWS SDK for Java 1.x
No auth needed
Prerequisites: None identified
devstral-2 · analyzed Feb 16, 2026 Full analysis →

References (1)

Core 1
Core References
Exploit, Third Party Advisory x_refsource_confirm
https://github.com/aws/aws-sdk-java/security/advisories/GHSA-c28r-hw5m-5gv3

Scores

CVSS v3 7.9
EPSS 0.0005
EPSS Percentile 16.6%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:L

CISA SSVC

Vulnrichment
Exploitation poc
Automatable no
Technical Impact total

Details

CWE
CWE-22
Status published
Products (2)
amazon/aws-sdk-java < 1.12.260
com.amazonaws/aws-java-sdk-s3 0 - 1.12.261Maven
Published Jul 15, 2022
Tracked Since Feb 18, 2026