CVE-2023-51651 Potential URI resolution path traversal in the AWS SDK for PHP
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.
Other vulnerabilities in aws-sdk-php
- CVE-2018-19981 Information disclosure in n/a
- CVE-2026-19642 Out-of-bounds write in the Base64 decoder in Amazon aws-sdk-cpp
- CVE-2026-19643 Out-of-bounds read in the Base64 decoder in Amazon aws-sdk-cpp on signed-char platforms
- CVE-2022-4725 AWS SDK XML Parser XpathUtils.java XpathUtils server-side request forgery
- CVE-2022-2582 Exposure of unencrypted plaintext hash in github.com/aws/aws-sdk-go
Sources
Also known as CLSA-2026-1769993567, UBUNTU-CVE-2023-51651.