CVE-2020-5225: Simplesamlphp/simplesamlphp Log Injection Vulnerability
LOWCVE-2020-5225 is a LOW (CVSS 4.4) log injection vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Simplesamlphp/simplesamlphp libraries in the Packagist ecosystem. The issue involves log injection in simplesamlphp. Remediation is available by upgrading affected packages to version 1.18.4.
CVE-2020-5225 at a Glance
Security Impact
CVSS: 4.4
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:L/A:N).
How to Fix CVE-2020-5225
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.4
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-5225, 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.4), 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-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. 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-5225 Affected Simplesamlphp/simplesamlphp Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
simplesamlphp/simplesamlphp
|
Packagist |
< 1.18.4
|
1.18.4
|
References
Frequently Asked Questions
What is CVE-2020-5225?
Which Simplesamlphp/simplesamlphp versions are affected?
What version fixes CVE-2020-5225?
Is simplesamlphp/simplesamlphp affected?
What is the CVSS score of CVE-2020-5225?
What CWE is associated with CVE-2020-5225?
How can I check Packagist dependencies for CVE-2020-5225?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6gc6-m364-85ww",
"modified" : "2021-01-08T20:33:05Z",
"published" : "2020-01-24T21:26:13Z",
"aliases" : [ "CVE-2020-5225" ],
"summary" : "Log injection in SimpleSAMLphp",
"details" : "### Background\n\nSimpleSAMLphp has a logging functionality that allows system administrators to keep track of the activity, errors, and statistics. Additionally, it allows users to report errors, shall they happen. An error report contains a report identifier, which is logged once submitted.\n\n### Description\n\nThe `www/erroreport.php` script, which receives error reports and sends them via email to the system administrator, didn't properly sanitize the report identifier obtained from the request. This allows an attacker, under specific circumstances, to inject new log lines by manually crafting this report ID.\n\nWhen configured to use the `file` logging handler, SimpleSAMLphp will output all its logs by appending each log line to a given file. Since the `reportID` parameter received in a request sent to `www/errorreport.php` was not properly sanitized, it was possible to inject newline characters into it, effectively allowing a malicious user to inject new log lines with arbitrary content.\n\n### Affected versions\n\nSimpleSAMLphp versions up to **1.18.3**.\n\n### Impact\n\nAn attacker may use this issue to inject logs messages into a SimpleSAMLphp log file, trying to trick or confuse system administrators. However, the attack surface is considered small, as the attack will only work with the `file` logging handler, which opens the log file in _append-only_ mode. This means an attacker cannot edit or remove existing log messages, and even if non-ascii characters are written to the log, the file will always be readable with a simple text editor.\n\n### Resolution\n\nUpgrade the SimpleSAMLphp installation to version **1.18.4**.\n\n### Credit\n\nThis vulnerability was discovered and reported by Frederic Vleminckx on January 23, 2020.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "simplesamlphp/simplesamlphp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.18.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/simplesamlphp/simplesamlphp/security/advisories/GHSA-6gc6-m364-85ww"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-5225"
}, {
"type" : "WEB",
"url" : "https://simplesamlphp.org/security/202001-02"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-532" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2020-01-24T20:46:16Z",
"nvd_published_at" : null
}
}