# CVE-2020-13959: Velocity Tools XSS Vulnerability

> Attackers can execute arbitrary JavaScript via reflected XSS in the default error page, potentially stealing session cookies or performing actions as the victim.

- **Severity:** Medium 6.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 10 Mar 2021
- **Updated:** 13 Feb 2025
- **Also known as:** DEBIAN-CVE-2020-13959, DLA-2597-1, GHSA-fh63-4r66-jc7v, OESA-2021-1122, ROOT-APP-MAVEN-CVE-2020-13959, UBUNTU-CVE-2020-13959, USN-6282-1

## What is CVE-2020-13959?

CVE-2020-13959 is a medium-severity cross-site scripting vulnerability in Debian Debian Linux, published on 10 Mar 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

The default error page for VelocityView in Apache Velocity Tools prior to 3.1 reflects back the vm file that was entered as part of the URL. An attacker can set an XSS payload file as this vm file in the URL which results in this payload being executed. XSS vulnerabilities allow attackers to execute arbitrary JavaScript in the context of the attacked website and the attacked user. This can be abused to steal session cookies, perform requests in the name of the victim or for phishing attacks.

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

## Which versions are affected by CVE-2020-13959?

4 open source packages ship an affected version, including org.apache.velocity.tools:velocity-tools-parent and org.apache.velocity:velocity-tools. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.velocity.tools:velocity-tools-parent` | Maven | All versions | 3.1 |
| `org.apache.velocity.tools:velocity-tools-parent` | Maven | All versions | 3.1 |
| `org.apache.velocity:velocity-tools` | Maven | All versions to 2.0 | None |
| `org.apache.velocity:velocity-tools` | Maven | All versions to 2.0 | None |

Products: Apache Velocity Tools, Debian Debian Linux.

## How do I fix CVE-2020-13959?

Upgrade org.apache.velocity.tools:velocity-tools-parent to 3.1 or later.

## Is CVE-2020-13959 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-13959 and fix it if it is affected.

What it is: CVE-2020-13959 is a medium-severity cross-site scripting vulnerability in Debian Debian Linux, published on 10 Mar 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2020-13959 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.velocity.tools:velocity-tools-parent (Maven): affected all versions; fixed in 3.1
- org.apache.velocity.tools:velocity-tools-parent (Maven): affected all versions; fixed in 3.1
- org.apache.velocity:velocity-tools (Maven): affected all versions up to 2.0; no fix listed
- org.apache.velocity:velocity-tools (Maven): affected all versions up to 2.0; no fix listed

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

## Sources

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

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