SCA: security update for com.amazonaws:aws-java-sdk-s3 (GHSA-c28r-hw5m-5gv3)

medium Tenable Cloud Security Plugin ID 413576

Description

There are packages installed that are affected by a vulnerability referenced in the following CVE:

- 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 `..` .
(CVE-2022-31159)

See Also

https://github.com/advisories/GHSA-c28r-hw5m-5gv3

Plugin Details

Severity: Medium

ID: 413576

Version: Revision 1.5

Type: Local

Family: SCA Checks

Published: 1/23/2025

Updated: 6/1/2026

Supported Sensors: Tenable Cloud Security, Tenable Self-Hosted Container Security

Risk Information

VPR

Risk Factor: Medium

Score: 5

Percentile: 94.39

Vendor

Vendor Severity: High

CVSS v2

Risk Factor: Medium

Base Score: 6.8

Temporal Score: 5.3

Vector: CVSS2#AV:N/AC:L/Au:S/C:C/I:N/A:N

CVSS Score Source: CVE-2022-31159

CVSS v3

Risk Factor: Medium

Base Score: 6.5

Temporal Score: 5.9

Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 7/15/2022

Vulnerability Publication Date: 7/15/2022

Reference Information

CVE: CVE-2022-31159

cwe: CWE-22