CVE-2026-32313·PHP vulnerability
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.
- Severity
- high
- Software
- PHP
- Fixed in
- 3.1.5
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.15% — higher than 5% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2026-32313 scores 8.2 on CVSS, so a successful attack would be serious — but at 0.15%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
Until: 3.1.5
Fixed in: 3.1.5
How to fix this CVE
Update PHP and the xmlseclibs library to version 3.1.5 or later to address a critical cryptographic weakness in GCM authentication tag validation. This vulnerability allows attackers to bypass encryption protections on XML-encrypted data, necessitating immediate patching on all affected systems.
sudo dnf update php php-xmlDefensia detects this vulnerability
How to check if you are affected
- Run `php -v` to check the installed PHP version, then verify xmlseclibs version with `php -r 'require "vendor/autoload.php"; echo \XMLSecurityKey::class;'` or check composer.lock for xmlseclibs version constraint
- Search your codebase for usage of GCM-mode encryption: `grep -r "aes-128-gcm\|aes-192-gcm\|aes-256-gcm" . --include="*.php"` to identify if vulnerable cipher modes are in active use
- Review web server logs for repeated failed XML signature or decryption operations, which may indicate brute-force attempts against authentication tags: `grep -i "xmlsec\|decrypt\|signature" /var/log/apache2/error.log | tail -100`
- Confirm the patch was applied by running `php -r 'echo phpversion();'` and verifying xmlseclibs is at 3.1.5+, then test XML decryption with a known GCM-encrypted payload to ensure no degradation
FAQ
What is CVE-2026-32313?
CVE-2026-32313 is a cryptographic validation flaw in xmlseclibs affecting AES-GCM encryption modes. The library fails to properly validate authentication tag lengths, enabling attackers to brute-force authentication tags, recover encryption keys, and forge arbitrary encrypted XML content.
Is CVE-2026-32313 being actively exploited?
No, CVE-2026-32313 is not currently listed on the CISA KEV catalog and has no known public exploits. However, the vulnerability poses significant cryptographic risk if exploited, warranting proactive remediation.
What versions of PHP are affected by CVE-2026-32313?
All versions of xmlseclibs prior to 3.1.5 are vulnerable. PHP installations using xmlseclibs for XML encryption and digital signatures should upgrade immediately regardless of the PHP major version.
How do I check if my server is vulnerable to CVE-2026-32313?
Run `composer show xmlseclibs` to display the installed version, or check `composer.lock` for xmlseclibs entries. Any version below 3.1.5 is vulnerable. For non-Composer installations, inspect the xmlseclibs source directory for version information.
Does Defensia detect CVE-2026-32313?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PHP and xmlseclibs are installed on a monitored server, CVE-2026-32313 will appear in your dashboard with remediation steps.
Related PHP CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-32313. Free for 1 server.
Get started free