Home / aws / aws-sdk-java / CVE-2022-31159
CVE-2022-31159: is it exploited, and which versions of aws-sdk-java are affected and fixed?
CVE-2022-31159 is a path traversal (reading or writing files outside the intended folder) vulnerability in aws-sdk-java. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 16:39 UTC). Affected: com.amazonaws:aws-java-sdk-s3 before 1.12.261 (GitHub advisory GHSA-c28r-hw5m-5gv3). Fixed in 1.12.261 (GitHub advisory GHSA-c28r-hw5m-5gv3). Severity: High (7.9, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 16:39 UTC, CVE record November 19, 2026, 07:14 UTC and NVD November 19, 2026, 07:47 UTC.
What is 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 `..` .
From the CVE record by GitHub_M, last updated April 22, 2025, 17:49 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| aws | aws-sdk-java | <= 1.12.260 |
As the CVE record by GitHub_M states it, last updated April 22, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| Maven | com.amazonaws:aws-java-sdk-s3 | < 1.12.261 | 1.12.261 | GHSA-c28r-hw5m-5gv3 |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated August 5, 2022. Summary: Partial Path Traversal in com.amazonaws:aws-java-sdk-s3.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| amazon | aws-sdk-java | through 1.12.260 | application |
NVD analysis (status Modified), last modified June 17, 2026, 04:44 UTC.
How severe is CVE-2022-31159?
| Score | Version | Vector | Source |
|---|---|---|---|
| High 7.9 | CVSS 3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:L | GitHub_M |
| Medium 6.5 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2022-31159 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: poc; automatable: no; technical impact: total (CISA ADP, April 22, 2025)
- EPSS
- 1.62% probability of exploitation activity in the next 30 days, percentile 76.8 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
Where are the vendor advisories and references?
- https://github.com/aws/aws-sdk-java/security/advisories/GHSA-c28r-hw5m-5gv3 x_refsource_CONFIRM
When was it published, and where is the official record?
- Reserved
- May 18, 2022
- Published
- July 15, 2022, 17:45 UTC
- CVE record updated
- April 22, 2025, 17:49 UTC by GitHub_M
- NVD
- Modified, last modified June 17, 2026, 04:44 UTC
- Last checked
- CVE list November 19, 2026, 07:14 UTC; NVD November 19, 2026, 07:47 UTC; KEV December 3, 2026, 16:39 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
Questions about CVE-2022-31159
Is CVE-2022-31159 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 16:39 UTC. FIRST's EPSS gives it a 1.62% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of aws-sdk-java are affected by CVE-2022-31159?
com.amazonaws:aws-java-sdk-s3 before 1.12.261, per the GitHub advisory GHSA-c28r-hw5m-5gv3. The tables above give every range the sources list.
Which version fixes CVE-2022-31159?
1.12.261, per the GitHub advisory GHSA-c28r-hw5m-5gv3. Check the vendor's advisory before you rely on it.
How severe is CVE-2022-31159?
High (7.9, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2022-31159?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.