GCM authentication tag length downgrade in Amazon S3 Encryption Client for PHP
Description
CVSSv3.1 Rating: Medium\ CVSSv3.1 Score: 5.3\ CVSSv3.1 Vector String: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
Summary\ Amazon S3 Encryption Client for PHP is a client-side encryption library, included in the AWS SDK for PHP, that encrypts and decrypts objects stored in Amazon S3. An issue exists where Amazon S3 Encryption Client for PHP accepts an AES-GCM authentication tag of any length from an encrypted object's metadata, which weakens the authenticity check performed during decryption.
Impact\ A user who can read and write an encrypted S3 object, and who knows or can guess its plaintext, might craft a forged ciphertext that the client accepts as authentic and decrypts to plaintext of their choice. The forged plaintext must be the same length as the original, and the attempt requires repeated writes to the object. The issue does not disclose the plaintext or the encryption key.
Impacted versions: >= 3.148.0 AND <= 3.383.0
Patches\ This issue has been addressed in aws-sdk-php version 3.383.1 \[fixed version; hyperlink\]. We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes.
Workarounds\ There are no workarounds for this issue. Customers must upgrade to AWS SDK for PHP version 3.383.1 or later.
References\ If you have any questions or comments about this advisory, we ask that you contact AWS Security via our vulnerability reporting page or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.