CVE-2020-5301: Simplesamlphp/simplesamlphp Remote Code Execution Vulnerability
LOWCVE-2020-5301 is a LOW (CVSS 3.0) remote code execution vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Simplesamlphp/simplesamlphp libraries in the Packagist ecosystem. The issue involves information disclosure of source code in simplesamlphp. Remediation is available by upgrading affected packages to version 1.18.6.
CVE-2020-5301 at a Glance
Security Impact
CVSS: 3.0
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:R/S:C/C:L/I:N/A:N).
How to Fix CVE-2020-5301
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.18.6
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 CVE-2020-5301, 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.18.6), 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-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. 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
CVE-2020-5301 Affected Simplesamlphp/simplesamlphp Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
simplesamlphp/simplesamlphp
|
Packagist |
< 1.18.6
|
1.18.6
|
References
Frequently Asked Questions
What is CVE-2020-5301?
Which Simplesamlphp/simplesamlphp versions are affected?
What version fixes CVE-2020-5301?
Is simplesamlphp/simplesamlphp affected?
What is the CVSS score of CVE-2020-5301?
What CWE is associated with CVE-2020-5301?
How can I check Packagist dependencies for CVE-2020-5301?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-24m3-w8g9-jwpq",
"modified" : "2024-02-06T13:27:42Z",
"published" : "2020-04-22T20:59:44Z",
"aliases" : [ "CVE-2020-5301" ],
"summary" : "Information disclosure of source code in SimpleSAMLphp",
"details" : "### Background\n\nThe module controller in `SimpleSAML\\Module` that processes requests for pages\nhosted by modules, has code to identify paths ending with `.php` and process\nthose as PHP code. If no other suitable way of handling the given path exists it\npresents the file to the browser.\n\n### Description\n\nThe check to identify paths ending with `.php` does not account for uppercase\nletters. If someone requests a path ending with e.g. `.PHP` and the server is\nserving the code from a case-insensitive file system, such as on Windows, the\nprocessing of the PHP code does not occur, and the source code is instead\npresented to the browser.\n\n### Affected versions\n\nSimpleSAMLphp versions **1.18.5 and older**.\n\n### Impact\n\nAn attacker may use this issue to gain access to the source code in third-party\nmodules that is meant to be private, or even sensitive. However, the attack\nsurface is considered small, as the attack will only work when SimpleSAMLphp\nserves such content from a file system that is not case-sensitive, such as on\nWindows.\n\n### Resolution\n\nUpgrade the SimpleSAMLphp installation to version **1.18.6**.\n\n### Credit\n\nThis vulnerability was discovered and reported by Sławek Naczyński.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "simplesamlphp/simplesamlphp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.18.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/simplesamlphp/simplesamlphp/security/advisories/GHSA-24m3-w8g9-jwpq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-5301"
}, {
"type" : "WEB",
"url" : "https://github.com/simplesamlphp/simplesamlphp/commit/47968d26a2fd3ed52da70dc09210921d612ce44e"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/simplesamlphp/simplesamlphp/CVE-2020-5301.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/simplesamlphp/simplesamlphp"
}, {
"type" : "WEB",
"url" : "https://simplesamlphp.org/security/202004-01"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-178", "CWE-200" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2020-04-21T19:50:30Z",
"nvd_published_at" : "2020-04-21T20:15:00Z"
}
}