CVE-2024-32981: Silverstripe/framework Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-chx7-9x8h-r5mg
CVSS 5.4
CWE-79
Published
Advisory Summary

CVE-2024-32981 is a MODERATE (CVSS 5.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Silverstripe/framework libraries in the Packagist ecosystem. The issue involves silverstripe framework has a cross-site scripting vulnerability with encoded payload. Remediation is available by upgrading affected packages to version 5.2.16.

CVE-2024-32981 at a Glance

CVE Identifier CVE-2024-32981
GHSA Identifier GHSA-chx7-9x8h-r5mg
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Silverstripe/framework
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 5.4

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

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

How to Fix CVE-2024-32981

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: 5.2.16
Upgrade silverstripe/framework to 5.2.16
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-2024-32981, 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 5.2.16), 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-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 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

### Impact A bad actor with access to edit content in the CMS could send a specifically crafted encoded payload to the server, which could be used to inject a JavaScript payload on the front end of the site. The payload would be sanitised on the client-side, but server-side sanitisation doesn't catch it. The server-side sanitisation logic has been updated to sanitise against this type of attack. ### References - https://www.silverstripe.org/download/security-releases/cve-2024-32981

CVE-2024-32981 Affected Silverstripe/framework Versions

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

References

Frequently Asked Questions

What is CVE-2024-32981?
CVE-2024-32981 is a security vulnerability in Silverstripe/framework involving Silverstripe Framework has a Cross-site Scripting vulnerability with encoded payload under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Silverstripe/framework versions are affected?
Affected versions include releases prior to 5.2.16 across affected packages: silverstripe/framework.
What version fixes CVE-2024-32981?
Upgrading to 5.2.16 (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 5.2.16. Upgrade your dependency to 5.2.16 or later.
What is the CVSS score of CVE-2024-32981?
CVE-2024-32981 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2024-32981?
CVE-2024-32981 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 Packagist dependencies for CVE-2024-32981?
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-chx7-9x8h-r5mg",
  "modified" : "2025-09-04T15:32:27Z",
  "published" : "2024-07-17T14:27:37Z",
  "aliases" : [ "CVE-2024-32981" ],
  "summary" : "Silverstripe Framework has a Cross-site Scripting vulnerability with encoded payload",
  "details" : "### Impact\nA bad actor with access to edit content in the CMS could send a specifically crafted encoded payload to the server, which could be used to inject a JavaScript payload on the front end of the site. The payload would be sanitised on the client-side, but server-side sanitisation doesn't catch it.\n\nThe server-side sanitisation logic has been updated to sanitise against this type of attack.\n\n### References\n- https://www.silverstripe.org/download/security-releases/cve-2024-32981",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "silverstripe/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.2.16"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/silverstripe/silverstripe-framework/security/advisories/GHSA-chx7-9x8h-r5mg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-32981"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/silverstripe/silverstripe-framework/commit/b8d20dc9d531550e06fd7da7a0eafa551922e2e1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/silverstripe/framework/CVE-2024-32981.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/silverstripe/silverstripe-framework"
  }, {
    "type" : "WEB",
    "url" : "https://www.silverstripe.org/download/security-releases/cve-2024-32981"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-17T14:27:37Z",
    "nvd_published_at" : "2024-07-17T20:15:05Z"
  }
}