VYPR
High severityNVD Advisory· Published Mar 13, 2026· Updated Mar 16, 2026

xmlseclibs is Missing AES-GCM Authentication Tag Validation on Encrypted Nodes Allows for Unauthorized Decryption

CVE-2026-32313

Description

xmlseclibs is a library written in PHP for working with XML Encryption and Signatures. Prior to 3.1.5, XML nodes encrypted with either aes-128-gcm, aes-192-gcm, or aes-256-gcm lack validation of the authentication tag length. An attacker can use this to brute-force an authentication tag, recover the GHASH key, and decrypt the encrypted nodes. It also allows to forge arbitrary ciphertexts without knowing the encryption key. This vulnerability is fixed in 3.1.5.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
robrichards/xmlseclibsPackagist
< 3.1.53.1.5

Affected products

1

Patches

1
03062be78178

Merge commit from fork

https://github.com/robrichards/xmlseclibsRob RichardsMar 13, 2026via ghsa
2 files changed · +7 0
  • CHANGELOG.txt+4 0 modified
    @@ -1,5 +1,9 @@
     xmlseclibs.php
     |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    +12, Dec 2026, 3.1.5
    +Security:
    +- Validate AES-GCM Authentication Tag (Sideni)
    +
     08, Dec 2025, 3.1.4
     Security:
     - fix canonicalization bypass error (d0ge)
    
  • src/XMLSecurityKey.php+3 0 modified
    @@ -475,6 +475,9 @@ private function decryptSymmetric($data)
                 // obtain and remove the authentication tag
                 $offset = 0 - self::AUTHTAG_LENGTH;
                 $authTag = substr($data, $offset);
    +            if (strlen($authTag) !== self::AUTHTAG_LENGTH) {
    +                throw new Exception('Authentication tag length is invalid');
    +            }
                 $data = substr($data, 0, $offset);
                 $decrypted = openssl_decrypt($data, $this->cryptParams['cipher'], $this->key, OPENSSL_RAW_DATA, $this->iv, $authTag);
             } else {
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.