CVE-2024-37156: Sulu/form bundle TokenController FormName Not Sanitized Vulnerability
MODERATECVE-2024-37156 is a MODERATE (CVSS 6.1) tokencontroller formname not sanitized vulnerability (CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)) affecting Sulu/form bundle libraries in the Packagist ecosystem. The issue involves tokencontroller formname not sanitized in hidden input. Remediation is available by upgrading affected packages to version 2.5.3.
CVE-2024-37156 at a Glance
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).
How to Fix CVE-2024-37156
To remediate this vulnerability, upgrade all affected Sulu/form bundle dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade sulu/form-bundle to 2.5.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for sulu/form-bundle
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-37156, inspect your project dependencies for Sulu/form bundle:
inspect dependencies for sulu/form-bundle
Analyze the terminal output to locate any version of Sulu/form bundle in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.5.3), 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-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS), where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages. In Sulu/form bundle, 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
CVE-2024-37156 Affected Sulu/form bundle Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
sulu/form-bundle
|
Packagist |
≥ 2.0.0
< 2.5.3
|
2.5.3
|
References
Frequently Asked Questions
What is CVE-2024-37156?
Which Sulu/form bundle versions are affected?
What version fixes CVE-2024-37156?
Is sulu/form-bundle affected?
What is the CVSS score of CVE-2024-37156?
What CWE is associated with CVE-2024-37156?
How can I check Packagist dependencies for CVE-2024-37156?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rrvc-c7xg-7cf3",
"modified" : "2024-06-06T21:36:40Z",
"published" : "2024-06-06T21:36:40Z",
"aliases" : [ "CVE-2024-37156" ],
"summary" : "TokenController formName not sanitized in hidden input",
"details" : "### Impact\n\nTokenController get parameter formName not sanitized in returned input field leads to XSS.\n\n_What kind of vulnerability is it? Who is impacted?_\n\n### Patches\n\n_Has the problem been patched? What versions should users upgrade to?_\n\n### Workarounds\n\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nCreate a custom Symfony Request listener which checks for the get value of `form` for the TokenController and if not valid stop the request dispatching and return a error status code.\n\n### References\n\n_Are there any links users can visit to find out more?_\n",
"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" : "Packagist",
"name" : "sulu/form-bundle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.5.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/sulu/SuluFormBundle/security/advisories/GHSA-rrvc-c7xg-7cf3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-37156"
}, {
"type" : "WEB",
"url" : "https://github.com/sulu/SuluFormBundle/commit/3f341b71a7309cbc8fd2c5bff894c654d1679b17"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/sulu/SuluFormBundle"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79", "CWE-80" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-06-06T21:36:40Z",
"nvd_published_at" : "2024-06-06T16:15:13Z"
}
}