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

aws/aws-sdk-php Updated 02 Oct 2025

Summary

21/12/2023
Yes i
Moderate
6.0

CVE-2023-51651: Potential URI resolution path traversal in the AWS SDK for PHP. Affects aws/aws-sdk-php versions < 3.288.1. Fixed in 3.288.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The AWS SDK for PHP is a comprehensive library that allows developers to interact with various AWS services using PHP. It provides a wide range of functionalities, including object storage, database management, and serverless computing. However, a vulnerability has been identified in versions prior to 3.288.1 that could potentially lead to a URI path traversal attack. This vulnerability exists in the buildEndpoint method of the RestSerializer component, which relies on the Guzzle Psr7 UriResolver utility. The vulnerability arises when handling requests to S3 object keys or prefixes containing a Unix double-dot. Under certain conditions, this could allow an attacker to access arbitrary objects.

Vulnerability Detail

The vulnerability in the AWS SDK for PHP allows for URI path traversal attacks. By exploiting this vulnerability, an attacker can manipulate the request path and access arbitrary objects within the S3 storage. The issue lies in the buildEndpoint method of the RestSerializer component, which relies on the Guzzle Psr7 UriResolver utility. This utility is responsible for stripping dot segments from the request path in accordance with RFC 3986. However, due to a flaw in the implementation, certain conditions can bypass the intended security measures and allow for path traversal. This vulnerability has a CVSS score of 6.0, indicating a moderate severity level.

How To Fix

Minimum fixed version

3.288.1

This is the first release that contains the fix.

composer require aws/aws-sdk-php:3.288.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to update to the patched version of the AWS SDK for PHP to mitigate the risk of URI path traversal attacks.

Conclusion

The AWS SDK for PHP prior to version 3.288.1 is vulnerable to a URI path traversal attack. To mitigate this risk, it is crucial to update to the latest version of the SDK. By doing so, users can ensure the security of their applications and prevent unauthorized access to sensitive data. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for aws/aws-sdk-php →

Share this vulnerability

FAQ

This vulnerability allows an attacker to perform URI path traversal attacks and potentially access arbitrary objects within the S3 storage. It could lead to unauthorized access to sensitive data or the manipulation of critical files.

Versions of the AWS SDK for PHP prior to 3.288.1 are affected by this vulnerability.

Yes, this vulnerability has a CVSS score of 6.0, indicating a moderate severity level.

There are no known exploits for this vulnerability at the moment. However, it is crucial to update to the patched version to prevent any potential attacks.

To update the AWS SDK for PHP, you can use Composer, the dependency management tool for PHP. Simply update the version constraint for the aws/aws-sdk-php package in your composer.json file to >=3.288.1 and run composer update.

Related vulnerabilities

Recent vulnerabilities recorded for aws/aws-sdk-php.

How To Fix

Minimum fixed version

3.288.1

This is the first release that contains the fix.

composer require aws/aws-sdk-php:3.288.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback