GHSA-vpr3-cw3h-prw8: Simplesamlphp/simplesamlphp Cross-Site Scripting Vulnerability
MODERATEGHSA-vpr3-cw3h-prw8 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Simplesamlphp/simplesamlphp libraries in the Packagist ecosystem. The issue involves simplesamlphp reflected cross-site scripting vulnerability. Remediation is available by upgrading affected packages to version 1.17.3.
GHSA-vpr3-cw3h-prw8 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 GHSA-vpr3-cw3h-prw8
To remediate this vulnerability, upgrade all affected Simplesamlphp/simplesamlphp 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 simplesamlphp/simplesamlphp to 1.17.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for simplesamlphp/simplesamlphp
How to Check if You Are Affected
To determine whether your application is affected by GHSA-vpr3-cw3h-prw8, inspect your project dependencies for Simplesamlphp/simplesamlphp:
inspect dependencies for simplesamlphp/simplesamlphp
Analyze the terminal output to locate any version of Simplesamlphp/simplesamlphp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.17.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-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 Simplesamlphp/simplesamlphp, 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
GHSA-vpr3-cw3h-prw8 Affected Simplesamlphp/simplesamlphp Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
simplesamlphp/simplesamlphp
|
Packagist |
≥ 1.12.0
< 1.17.3
|
1.17.3
|
References
Frequently Asked Questions
What is GHSA-vpr3-cw3h-prw8?
Which Simplesamlphp/simplesamlphp versions are affected?
What version fixes GHSA-vpr3-cw3h-prw8?
Is simplesamlphp/simplesamlphp affected?
What is the CVSS score of GHSA-vpr3-cw3h-prw8?
What CWE is associated with GHSA-vpr3-cw3h-prw8?
How can I check Packagist dependencies for GHSA-vpr3-cw3h-prw8?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vpr3-cw3h-prw8",
"modified" : "2024-05-28T20:55:51Z",
"published" : "2024-05-28T20:55:51Z",
"aliases" : [ ],
"summary" : "SimpleSAMLphp Reflected Cross-site Scripting vulnerability",
"details" : "### Background\nSimpleSAMLphp uses metadata to determine how to interact with other SAML entities. This metadata includes what’s called endpoints, which are URLs belonging to that entity where SAML messages can be sent. These URLs are used directly by SimpleSAMLphp when a message is sent, either via an HTTP redirection or by automatically posting a form to them.\n\n### Description\nWhen sending a SAML message to another entity, SimpleSAMLphp will use the URL of the appropriate endpoint to redirect the user’s browser to it, or craft a form that will be automatically posted to it, depending on the SAML binding used. The URL that’s target of the message is fetched from the stored metadata for the given entity, and that metadata is trusted as correct.\n\nHowever, if that metadata has been altered by a malicious party (either an attacker or a rogue administrator) to substitute the URLs of the endpoints with javascript code, SimpleSAMLphp was blindly using them without any validation, trusting the contents of the metadata. This would lead to a reflected XSS where the javascript code is sent inline to the web browser, and if SimpleSAMLphp is not using a strict Content Security Policy to forbid inline javascript (which is the case of the default user interface), then the code will be executed in the end user’s browser.\n\n### Affected versions\nAll SimpleSAMLphp versions are affected, up to 1.17.2.\n\n### Impact\nIf metadata is consumed for a rogue entity that includes javascript code in the corresponding endpoints, this javascript code might be run by users trying to access this entity.\n\nEven though it’s unlikely that an administrator would add metadata for an entity that contains such endpoints inadvertently, if metadata is consumed automatically (e.g. using metarefresh) it would be easier to have an scenario like the one described here if a SAML entity is compromised and its metadata modified.\n\nThe severity is assessed as medium given the difficulty to exploit the issue.",
"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" : "simplesamlphp/simplesamlphp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.12.0"
}, {
"fixed" : "1.17.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/simplesamlphp/simplesamlphp/commit/ce2294e092b3be7db2fc4e18e774b791d4564ff3"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/simplesamlphp/simplesamlphp/2019-07-10.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/simplesamlphp/simplesamlphp"
}, {
"type" : "WEB",
"url" : "https://simplesamlphp.org/security/201907-01"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-28T20:55:51Z",
"nvd_published_at" : null
}
}