GHSA-p2v5-xcqm-4fv6: Silverstripe/taxonomy SQL Injection Vulnerability

HIGH
CVSS 7.5
CWE-89
Published
Advisory Summary

GHSA-p2v5-xcqm-4fv6 is a HIGH (CVSS 7.5) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Silverstripe/taxonomy libraries in the Packagist ecosystem. The issue involves silverstripe/taxonomy sql injection vulnerability. Remediation is available by upgrading affected packages to version 1.3.1, 2.0.1.

GHSA-p2v5-xcqm-4fv6 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-p2v5-xcqm-4fv6
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Silverstripe/taxonomy
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix GHSA-p2v5-xcqm-4fv6

To remediate this vulnerability, upgrade all affected Silverstripe/taxonomy 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/taxonomy fixed: 1.3.1
Upgrade silverstripe/taxonomy to 1.3.1
silverstripe/taxonomy fixed: 2.0.1
Upgrade silverstripe/taxonomy to 2.0.1
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/taxonomy

How to Check if You Are Affected

To determine whether your application is affected by GHSA-p2v5-xcqm-4fv6, inspect your project dependencies for Silverstripe/taxonomy:

inspect dependencies for silverstripe/taxonomy

Analyze the terminal output to locate any version of Silverstripe/taxonomy in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.1), 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-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Silverstripe/taxonomy, 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

There is a vulnerability in silverstripe/taxonomy module that allows SQL injection. This affected controller (`TaxonomyDirectoryController`) is disabled by default and must be enabled by a developer for the exploit to be possible.

GHSA-p2v5-xcqm-4fv6 Affected Silverstripe/taxonomy Versions

2 component(s)
Fixed Versions:
1.3.12.0.1
Product / Package Ecosystem Affected Versions Fixed Version
silverstripe/taxonomy
Packagist
≥ 1.3.0
< 1.3.1
1.3.1
silverstripe/taxonomy
Packagist
≥ 2.0.0
< 2.0.1
2.0.1

References

Frequently Asked Questions

What is GHSA-p2v5-xcqm-4fv6?
GHSA-p2v5-xcqm-4fv6 is a security vulnerability in Silverstripe/taxonomy involving silverstripe/taxonomy SQL Injection vulnerability under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Silverstripe/taxonomy versions are affected?
Affected versions include releases prior to 1.3.1, 2.0.1 across affected packages: silverstripe/taxonomy.
What version fixes GHSA-p2v5-xcqm-4fv6?
Upgrading to 1.3.1, 2.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is silverstripe/taxonomy affected?
Yes, silverstripe/taxonomy is affected in releases prior to 1.3.1, 2.0.1. Upgrade your dependency to 1.3.1, 2.0.1 or later.
What is the CVSS score of GHSA-p2v5-xcqm-4fv6?
GHSA-p2v5-xcqm-4fv6 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with GHSA-p2v5-xcqm-4fv6?
GHSA-p2v5-xcqm-4fv6 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Packagist dependencies for GHSA-p2v5-xcqm-4fv6?
Run the dependency tree command: 'inspect dependencies for silverstripe/taxonomy'. 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-p2v5-xcqm-4fv6",
  "modified" : "2024-05-28T17:29:03Z",
  "published" : "2024-05-28T17:29:03Z",
  "aliases" : [ ],
  "summary" : "silverstripe/taxonomy SQL Injection vulnerability",
  "details" : "There is a vulnerability in silverstripe/taxonomy module that allows SQL injection. This affected controller (`TaxonomyDirectoryController`) is disabled by default and must be enabled by a developer for the exploit to be possible.\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "silverstripe/taxonomy"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.3.0"
      }, {
        "fixed" : "1.3.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "silverstripe/taxonomy"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/silverstripe/silverstripe-taxonomy/commit/01a5d9e04b993df507058aa53e6e18efc5ca405b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/silverstripe/silverstripe-taxonomy/commit/d037941e931490c33af5029c676447ed38896ee8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/silverstripe/taxonomy/SS-2018-011-1.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/silverstripe/silverstripe-taxonomy"
  }, {
    "type" : "WEB",
    "url" : "https://www.silverstripe.org/download/security-releases/ss-2018-011"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-28T17:29:03Z",
    "nvd_published_at" : null
  }
}