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

Published Jul 15, 2022
·
Updated

AWS SDK for Java could allow a remote authenticated attacker to traverse directories on the system, caused by a flaw in the downloadDirectory method in the AWS S3 TransferManager component. An attacker could send a specially-crafted URL request containing "dot dot" sequences (/../) to write arbitrary files on the system.

Other sources

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

Affected Software

2 affected components
IBM Disconnected Log Collector<=v1.0 - v1.8.2
Amazon Aws-sdk-java<=1.12.260

Event History

Jul 15, 2022
CVE Published
via MITRE·05:45 PM
Data Sourced
via MITRE·05:45 PM
DescriptionSeverityWeakness

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID?

The vulnerability ID is CVE-2022-31159.

2

What is the affected software?

The affected software is IBM Disconnected Log Collector version v1.0 - v1.8.2.

3

What is the severity of CVE-2022-31159?

The severity of CVE-2022-31159 is high.

4

How does CVE-2022-31159 allow a remote attacker to traverse directories?

CVE-2022-31159 allows a remote authenticated attacker to traverse directories by exploiting a flaw in the downloadDirectory method in the AWS S3 TransferManager component.

5

How can an attacker exploit CVE-2022-31159?

An attacker can exploit CVE-2022-31159 by sending a specially-crafted URL request containing "dot dot" sequences (/../) to write arbitrary files.

6

Are there any references available for CVE-2022-31159?

Yes, you can find references for CVE-2022-31159 at the following links: [1] [2]

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203