Vulnerabilities in pkg:maven/org.apache.velocity/velocity-tools
PACKAGECVE-2020-13959 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Velocity tools parent libraries in the Maven ecosystem. The issue involves cross-site scripting (xss) in apache velocity tools. Remediation is available by upgrading affected packages to version 3.1.
pkg:maven/org.apache.velocity/velocity-tools
Vulnerability advisories affecting package pkg:maven/org.apache.velocity/velocity-tools. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-fh63-4r66-jc7v | CVE-2020-13959 | MODERATE | Cross-site scripting (XSS) in Apache Velocity Tools |
CVE-2020-13959 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2020-13959
To remediate this vulnerability, upgrade all affected Velocity tools parent dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.velocity.tools</groupId>
<artifactId>velocity-tools-parent</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
<version>Latest secure release</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.velocity.tools
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2020-13959, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.velocity.tools
Analyze the terminal output to locate any version of Velocity tools parent in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.velocity.tools command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Velocity tools parent, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-13959 Affected Velocity tools parent Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.velocity.tools:velocity-tools-parent
|
Maven |
< 3.1
|
3.1
|
|
org.apache.velocity:velocity-tools
|
Maven |
≤ 2.0
|
|
References
Frequently Asked Questions
What is CVE-2020-13959?
Which Velocity tools parent versions are affected?
What version fixes CVE-2020-13959?
Is velocity-tools-parent affected?
Is velocity-tools affected?
What is the CVSS score of CVE-2020-13959?
What CWE is associated with CVE-2020-13959?
How can I check Maven dependencies for CVE-2020-13959?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fh63-4r66-jc7v",
"modified" : "2022-04-25T23:35:22Z",
"published" : "2021-03-12T20:24:22Z",
"aliases" : [ "CVE-2020-13959" ],
"summary" : "Cross-site scripting (XSS) in Apache Velocity Tools",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.velocity.tools:velocity-tools-parent"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.velocity:velocity-tools"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-13959"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r6802a38c3041059e763a1aadd7b37fe95de75408144b5805e29b84e3%40%3Cuser.velocity.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r6802a38c3041059e763a1aadd7b37fe95de75408144b5805e29b84e3@%3Cuser.velocity.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r97edad0655770342d2d36620fb1de50b142fcd6c4f5c53dd72ca41d7@%3Cuser.velocity.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rb042f3b0090e419cc9f5a3d32cf0baff283ccd6fcb1caea61915d6b6@%3Ccommits.velocity.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rf9868c564cff7adfd5283563f2309b93b3e496354a211a57503b2f72@%3Cannounce.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2021/03/msg00021.html"
}, {
"type" : "WEB",
"url" : "https://security.gentoo.org/glsa/202107-52"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2021/03/10/2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-03-12T20:23:42Z",
"nvd_published_at" : "2021-03-10T08:15:00Z"
}
}