CVE-2022-31159
Last modified
CVE-2022-31159 is a medium-severity vulnerability rated 6.5/10 on the CVSS scale. 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. EPSS estimates a 1.19% chance of exploitation in the next 30 days.
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 `..` .
Metrics
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Amazon | Aws-Sdk-Java | <= 1.12.260 |
References
- https://github.com/aws/aws-sdk-java/security/advisories/GHSA-c28r-hw5m-5gv3Exploit, Third Party Advisory
- https://github.com/aws/aws-sdk-java/security/advisories/GHSA-c28r-hw5m-5gv3Exploit, Third Party Advisory
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2022-31159?
How severe is CVE-2022-31159?
How do I fix CVE-2022-31159?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2022
- CVE-2022-31153OpenZeppelin Contracts for Cairo is a library for contract d…6.5
- CVE-2022-31154Sourcegraph is an opensource code search and navigation engi…4.3
- CVE-2022-31155Sourcegraph is an opensource code search and navigation engi…4.3
- CVE-2022-31156Gradle is a build tool. Dependency verification is a securit…4.4
- CVE-2022-31157LTI 1.3 Tool Library is a library used for building IMS-cert…7.5
- CVE-2022-31158LTI 1.3 Tool Library is a library used for building IMS-cert…7.5
- CVE-2022-3116The Heimdal Software Kerberos 5 implementation is vulnerable…7.5
- CVE-2022-31160jQuery UI is a curated set of user interface interactions, e…6.1
- CVE-2022-31161Roxy-WI is a Web interface for managing HAProxy, Nginx and K…9.8
- CVE-2022-31162Slack Morphism is an async client library for Rust. Prior to…7.5
- CVE-2022-31163TZInfo is a Ruby library that provides access to time zone d…8.1
- CVE-2022-31164Tovy is a a staff management system for Roblox groups. A vul…7.5
Are you affected by CVE-2022-31159?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
