CVE-2020-25817: Silverstripe/framework SilverStripe XXE Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-3vjc-5x79-m9r8
CVSS 4.8
CWE-611
Published
Advisory Summary

CVE-2020-25817 is a MODERATE (CVSS 4.8) silverstripe xxe vulnerability vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Silverstripe/framework libraries in the Packagist ecosystem. The issue involves silverstripe xxe vulnerability in csscontentparser. Remediation is available by upgrading affected packages to version 4.7.4.

CVE-2020-25817 at a Glance

CVE Identifier CVE-2020-25817
GHSA Identifier GHSA-3vjc-5x79-m9r8
Severity MODERATE
CVSS v3.1 Base Score 4.8
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Silverstripe/framework
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 4.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
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-25817

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

silverstripe/framework fixed: 4.7.4
Upgrade silverstripe/framework to 4.7.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for silverstripe/framework

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-25817, inspect your project dependencies for Silverstripe/framework:

inspect dependencies for silverstripe/framework

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

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. In Silverstripe/framework, 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

SilverStripe through 4.6.0-rc1 has an XXE Vulnerability in CSSContentParser. A developer utility meant for parsing HTML within unit tests can be vulnerable to XML External Entity (XXE) attacks. When this developer utility is misused for purposes involving external or user submitted data in custom project code, it can lead to vulnerabilities such as XSS on HTML output rendered through this custom code. This is now mitigated by disabling external entities during parsing. (The correct CVE ID year is 2020 [CVE-2020-25817, not CVE-2021-25817]).

CVE-2020-25817 Affected Silverstripe/framework Versions

1 component(s)
Fixed Versions:
4.7.4
Product / Package Ecosystem Affected Versions Fixed Version
silverstripe/framework
Packagist
≥ 4.0.0
< 4.7.4
4.7.4

References

Frequently Asked Questions

What is CVE-2020-25817?
CVE-2020-25817 is a security vulnerability in Silverstripe/framework involving SilverStripe XXE Vulnerability in CSSContentParser under CWE-611: Improper Restriction of XML External Entity Reference.
Which Silverstripe/framework versions are affected?
Affected versions include releases prior to 4.7.4 across affected packages: silverstripe/framework.
What version fixes CVE-2020-25817?
Upgrading to 4.7.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is silverstripe/framework affected?
Yes, silverstripe/framework is affected in releases prior to 4.7.4. Upgrade your dependency to 4.7.4 or later.
What is the CVSS score of CVE-2020-25817?
CVE-2020-25817 has a CVSS v3.1 base score of 4.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2020-25817?
CVE-2020-25817 is classified under CWE-611: Improper Restriction of XML External Entity Reference (The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.).
How can I check Packagist dependencies for CVE-2020-25817?
Run the dependency tree command: 'inspect dependencies for silverstripe/framework'. 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-3vjc-5x79-m9r8",
  "modified" : "2024-04-25T21:06:33Z",
  "published" : "2022-05-24T19:04:19Z",
  "aliases" : [ "CVE-2020-25817" ],
  "summary" : "SilverStripe XXE Vulnerability in CSSContentParser",
  "details" : "SilverStripe through 4.6.0-rc1 has an XXE Vulnerability in CSSContentParser. A developer utility meant for parsing HTML within unit tests can be vulnerable to XML External Entity (XXE) attacks. When this developer utility is misused for purposes involving external or user submitted data in custom project code, it can lead to vulnerabilities such as XSS on HTML output rendered through this custom code. This is now mitigated by disabling external entities during parsing. (The correct CVE ID year is 2020 [CVE-2020-25817, not CVE-2021-25817]).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "silverstripe/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.7.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-25817"
  }, {
    "type" : "WEB",
    "url" : "https://forum.silverstripe.org/c/releases"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/silverstripe/silverstripe-framework"
  }, {
    "type" : "WEB",
    "url" : "https://www.silverstripe.org/blog/tag/release"
  }, {
    "type" : "WEB",
    "url" : "https://www.silverstripe.org/download/security-releases"
  }, {
    "type" : "WEB",
    "url" : "https://www.silverstripe.org/download/security-releases/cve-2021-25817"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-25T21:06:33Z",
    "nvd_published_at" : "2021-06-08T18:15:00Z"
  }
}