# CVE-2026-129320: Apache Shiro: Principal tags in Jakarta Pages and Jakarta Faces do not escape output, allowing cross-site scripting

> Untrusted principal values passed to Shiro's principal tag can inject scripts into pages; Java apps using Shiro principal tags should care.

- **Severity:** Low 2.1 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/S:N/AU:N/V:D/RE:L/U:Green`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Harmful if only installed:** No
- **Needs a specific call:** Yes
- **Fix available:** No
- **Published:** 16 Nov 2026
- **Updated:** 16 Nov 2026
- **Also known as:** DEBIAN-CVE-2026-129320, GHSA-969f-mppv-qv32, UBUNTU-CVE-2026-129320

## What is CVE-2026-129320?

CVE-2026-129320 is a low-severity cross-site scripting vulnerability in Apache Shiro, published on 16 Nov 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

The shiro:principal tags in shiro-web (Jakarta Pages) and shiro-jakarta-ee (Jakarta Faces) did not escape their output, which could allow cross-site scripting when a principal value is not fully trusted.
This issue affects all Apache Shiro versions through 3.0.1, only when the principal tag is used.

Mitigation: Upgrade to version 3.0.2 or later, which escapes the output.
Alternatively, validate principal values on input.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

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

2 open source packages ship an affected version, including org.apache.shiro:shiro-jakarta-ee and org.apache.shiro:shiro-web.

An affected version is only exploitable if your software uses the vulnerable function or option. Many projects that include it are not exposed.


| Package | Ecosystem | PURL | Affected | Fixed in |
| --- | --- | --- | --- | --- |
| `org.apache.shiro:shiro-jakarta-ee` | Maven | `pkg:maven/org.apache.shiro/shiro-jakarta-ee` | From 2.0.0-alpha-0 | 3.0.2 |
| `org.apache.shiro:shiro-web` | Maven | `pkg:maven/org.apache.shiro/shiro-web` | All versions | 3.0.2 |

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

Upgrade org.apache.shiro:shiro-jakarta-ee to 3.0.2 or later.

## Is CVE-2026-129320 being exploited?

There is no known exploitation of CVE-2026-129320 in the wild and no public exploit code.

## Fix prompt for AI coding agents

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

What it is: CVE-2026-129320 is a low-severity cross-site scripting vulnerability in Apache Shiro, published on 16 Nov 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-129320 in the wild and no public exploit code.
Exposure: An affected version is only exploitable if your software uses the vulnerable function or option. Many projects that include it are not exposed.

Affected packages and fixed versions:
- org.apache.shiro:shiro-jakarta-ee (Maven): affected from 2.0.0-alpha-0; fixed in 3.0.2
- org.apache.shiro:shiro-web (Maven): affected all versions; fixed in 3.0.2

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-129320/ (Markdown: https://insights.sbomify.com/CVE-2026-129320/index.md)
```

## Sources

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

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