# CVE-2026-32313: xmlseclibs is Missing AES-GCM Authentication Tag Validation on Encrypted Nodes Allows for Unauthorized Decryption

> Attackers can decrypt encrypted XML nodes or forge ciphertexts due to missing authentication tag validation in xmlseclibs.

- **Severity:** High 8.2 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Mar 2026
- **Updated:** 16 Mar 2026
- **Also known as:** GHSA-4v26-v6cg-g6f9

## What is CVE-2026-32313?

CVE-2026-32313 is a high-severity vulnerability in robrichards xmlseclibs, published on 13 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-354 (Improper Validation of Integrity Check Value)

## Which versions are affected by CVE-2026-32313?

2 open source packages ship an affected version, including robrichards/xmlseclibs. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `robrichards/xmlseclibs` | Packagist | All versions | 3.1.5 |
| `robrichards/xmlseclibs` | Packagist | All versions | 3.1.5 |

Products: Xmlseclibs Project Xmlseclibs.

## How do I fix CVE-2026-32313?

Upgrade robrichards/xmlseclibs to 3.1.5 or later.

## Is CVE-2026-32313 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-32313 exists.

## Other vulnerabilities in robrichards xmlseclibs

- [CVE-2025-66578](https://insights.sbomify.com/CVE-2025-66578/): robrichards/xmlseclibs has an Libxml2 Canonicalization error which can bypass Digest/Signature validation (medium 6.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-32313 and fix it if it is affected.

What it is: CVE-2026-32313 is a high-severity vulnerability in robrichards xmlseclibs, published on 13 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-32313 exists.

Affected packages and fixed versions:
- robrichards/xmlseclibs (Packagist): affected all versions; fixed in 3.1.5
- robrichards/xmlseclibs (Packagist): affected all versions; fixed in 3.1.5

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-32313/ (Markdown: https://insights.sbomify.com/CVE-2026-32313/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-32313
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-32313
- OSV: https://osv.dev/vulnerability/CVE-2026-32313

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-32313/
Summaries are generated and may contain mistakes; the official description above is the record.
