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.
| Package | Affected versions | Patched versions |
|---|---|---|
robrichards/xmlseclibsPackagist | < 3.1.5 | 3.1.5 |
Affected products
1- Range: < 3.1.5
Patches
103062be78178Merge commit from fork
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- github.com/advisories/GHSA-4v26-v6cg-g6f9ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-32313ghsaADVISORY
- github.com/robrichards/xmlseclibs/commit/03062be78178cbb5e8f605cd255dc32a14981f92ghsax_refsource_MISCWEB
- github.com/robrichards/xmlseclibs/releases/tag/3.1.5ghsax_refsource_MISCWEB
- github.com/robrichards/xmlseclibs/security/advisories/GHSA-4v26-v6cg-g6f9ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.