Vulnerabilities in pkg:maven/org.apache.velocity.tools/velocity-tools-parent

PACKAGE
Advisory Identifier: GHSA-fh63-4r66-jc7v
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.velocity.tools/velocity-tools-parent

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.velocity.tools/velocity-tools-parent. 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

CVE Identifier CVE-2020-13959
GHSA Identifier GHSA-fh63-4r66-jc7v
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Velocity tools parent
Package Ecosystem Maven
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (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.

org.apache.velocity.tools:velocity-tools-parent fixed: 3.1
<dependency>
    <groupId>org.apache.velocity.tools</groupId>
    <artifactId>velocity-tools-parent</artifactId>
    <version>3.1</version>
</dependency>
org.apache.velocity:velocity-tools fixed: Latest secure release
<dependency>
    <groupId>org.apache.velocity</groupId>
    <artifactId>velocity-tools</artifactId>
    <version>Latest secure release</version>
</dependency>
Verify Direct and Transitive Dependencies

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

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.

CVE-2020-13959 Affected Velocity tools parent Versions

2 component(s)
Fixed Versions:
3.1
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?
CVE-2020-13959 is a security vulnerability in Velocity tools parent involving Cross-site scripting (XSS) in Apache Velocity Tools under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Velocity tools parent versions are affected?
Affected versions include releases prior to 3.1 across affected packages: org.apache.velocity.tools:velocity-tools-parent, org.apache.velocity:velocity-tools.
What version fixes CVE-2020-13959?
Upgrading to 3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is velocity-tools-parent affected?
Yes, org.apache.velocity.tools:velocity-tools-parent is affected in releases prior to 3.1. Upgrade your dependency to 3.1 or later.
Is velocity-tools affected?
Yes, org.apache.velocity:velocity-tools is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2020-13959?
CVE-2020-13959 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2020-13959?
CVE-2020-13959 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check Maven dependencies for CVE-2020-13959?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.velocity.tools'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}