CVE-2023-51651 Potential URI resolution path traversal in the AWS SDK for PHP

Medium 6.0 Published Updated

Attackers can access arbitrary S3 objects via path traversal in AWS SDK for PHP when handling specific object keys.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2023-51651?

CVE-2023-51651 is a medium-severity path traversal vulnerability in aws-sdk-php, published on 22 Dec 2023. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

AWS SDK for PHP is the Amazon Web Services software development kit for PHP. Within the scope of requests to S3 object keys and/or prefixes containing a Unix double-dot, a URI path traversal is possible. The issue exists in the `buildEndpoint` method in the RestSerializer component of the AWS SDK for PHP v3 prior to 3.288.1. The `buildEndpoint` method relies on the Guzzle Psr7 UriResolver utility, which strips dot segments from the request path in accordance with RFC 3986. Under certain conditions, this could lead to an arbitrary object being accessed. This issue has been patched in version 3.288.1.

Weakness: CWE-22

Which versions are affected by CVE-2023-51651?

It affects 1 product.

Products include Amazon Aws Software Development Kit.

How do I fix CVE-2023-51651?

Upgrade to a fixed version.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2023-51651 being exploited?

There is no known exploitation of CVE-2023-51651 in the wild and no public exploit code.

Sources

Also known as CLSA-2026-1769993567, UBUNTU-CVE-2023-51651.

Is CVE-2023-51651 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free