CVE-2019-12520: Software Security Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-gx26-q49r-m7g8
CWE-20
Published
Advisory Summary

CVE-2019-12520 is a MODERATE security vulnerability vulnerability (CWE-20: Improper Input Validation) affecting Software libraries in the Maven ecosystem. The weakness occurs when the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.. Remediation is available in the latest vendor maintenance releases.

CVE-2019-12520 at a Glance

CVE Identifier CVE-2019-12520
GHSA Identifier GHSA-gx26-q49r-m7g8
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-20: Improper Input Validation
Affected Product Software
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2019-12520

To remediate this vulnerability, upgrade all affected Software dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

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

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2019-12520, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree

Analyze the terminal output to locate any version of Software in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The mvn dependency:tree 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Software, 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

An issue was discovered in Squid through 4.7 and 5. When receiving a request, Squid checks its cache to see if it can serve up a response. It does this by making a MD5 hash of the absolute URL of the request. If found, it servers the request. The absolute URL can include the decoded UserInfo (username and password) for certain protocols. This decoded info is prepended to the domain. This allows an attacker to provide a username that has special characters to delimit the domain, and treat the rest of the URL as a path or query string. An attacker could first make a request to their domain using an encoded username, then when a request for the target domain comes in that decodes to the exact URL, it will serve the attacker's HTML instead of the real HTML. On Squid servers that also act as reverse proxies, this allows an attacker to gain access to features that only reverse proxies can use, such as ESI.

References

Frequently Asked Questions

What is CVE-2019-12520?
CVE-2019-12520 is a security vulnerability in Software classified as a security vulnerability vulnerability under CWE-20: Improper Input Validation.
Which Software versions are affected?
Affected versions include releases prior to current release patches.
What version fixes CVE-2019-12520?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
What CWE is associated with CVE-2019-12520?
CVE-2019-12520 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check Maven dependencies for CVE-2019-12520?
Run the dependency tree command: 'mvn dependency:tree'. 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-gx26-q49r-m7g8",
  "modified" : "2022-05-24T17:14:19Z",
  "published" : "2022-05-24T17:14:19Z",
  "aliases" : [ "CVE-2019-12520" ],
  "details" : "An issue was discovered in Squid through 4.7 and 5. When receiving a request, Squid checks its cache to see if it can serve up a response. It does this by making a MD5 hash of the absolute URL of the request. If found, it servers the request. The absolute URL can include the decoded UserInfo (username and password) for certain protocols. This decoded info is prepended to the domain. This allows an attacker to provide a username that has special characters to delimit the domain, and treat the rest of the URL as a path or query string. An attacker could first make a request to their domain using an encoded username, then when a request for the target domain comes in that decodes to the exact URL, it will serve the attacker's HTML instead of the real HTML. On Squid servers that also act as reverse proxies, this allows an attacker to gain access to features that only reverse proxies can use, such as ESI.",
  "severity" : [ ],
  "affected" : [ ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-12520"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/squid-cache/squid/commits/v4"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.com/jeriko.one/security/-/blob/master/squid/CVEs/CVE-2019-12520.txt"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2020/07/msg00009.html"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20210205-0006"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/4446-1"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2020/dsa-4682"
  }, {
    "type" : "WEB",
    "url" : "http://www.squid-cache.org/Versions/v4"
  }, {
    "type" : "WEB",
    "url" : "http://www.squid-cache.org/Versions/v4/changesets"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : false,
    "github_reviewed_at" : null,
    "nvd_published_at" : "2020-04-15T20:15:00Z"
  }
}