Listen to this Post
This vulnerability is a cryptographic key commitment flaw in the AWS S3 Encryption Client for Java, known as an “Invisible Salamanders” attack. When the client uses an “Instruction File” to store the Encrypted Data Key (EDK) separately from the S3 object’s metadata, the EDK is not cryptographically bound to the ciphertext. This lack of binding means a single ciphertext can be decrypted into different plaintexts using different data keys. An attacker with write permissions to the S3 bucket can replace the legitimate instruction file with a malicious one containing a rogue EDK. This rogue EDK is crafted so that it also decrypts the original ciphertext but produces an attacker-chosen plaintext. Any subsequent `GetObject` operation by a user will unknowingly use the malicious EDK, returning forged data without detection, compromising data integrity.
Platform: AWS S3 Encryption Client
Version: <= 3.5.0
Vulnerability: Missing Key Commitment
Severity: Critical
Date: 2025-12-17
Prediction: 2025-12-17
What Undercode Say:
Check current Java client version in pom.xml grep -A1 -B1 'amazon-s3-encryption-client-java' pom.xml Example AWS CLI command for S3 operations (contextual) aws s3 cp encrypted-file.txt s3://my-bucket/ --sse-c AES256 --sse-c-key fileb://key.bin
// Instantiating the patched S3 Encryption Client v4.0.0 with key commitment S3Client v4Client = S3EncryptionClient.builderV4() .kmsKeyId(kmsKeyId) .commitmentPolicy(CommitmentPolicy.REQUIRE_ENCRYPT_REQUIRE_DECRYPT) .build();
How Exploit:
An attacker needs two prerequisites: 1) the ability to create a rogue Encrypted Data Key that decrypts the existing ciphertext to a chosen plaintext, and 2) write permissions (s3:PutObject) to the target S3 bucket to upload a new instruction file. The attacker exploits the missing key commitment by generating a valid EDK for a malicious plaintext that matches the original ciphertext. They then overwrite the `.instruction` file in the bucket with their version. When a victim uses the S3 client to decrypt the object, it fetches the attacker’s instruction file, uses the rogue EDK, and successfully decrypts to the attacker’s data, with no errors to alert the victim.
Protection from this CVE:
Upgrade to S3 Encryption Client for Java version 4.0.0 or later, which enables key-committing algorithm suites by default. The fix cryptographically binds the Encrypted Data Key to the ciphertext, making the “Invisible Salamanders” attack impossible. Version 3.6.0 can read committed messages but not write them; full migration to v4.x is required for complete protection. There are no workarounds; upgrading is mandatory.
Impact:
Successful exploitation compromises data integrity, allowing attackers with bucket write access to silently replace decrypted content. This can facilitate data manipulation, fraud, or be a step in ransomware attacks by making data irrecoverable. The attack is stealthy because decryption appears normal to users and applications.
🎯Let’s Practice Exploiting & Learn Patching For Free:
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

