GHSA-f57v-q966-7fh6: Monolog/monolog Monolog Header Injection Vulnerability
LOWGHSA-f57v-q966-7fh6 is a LOW monolog header injection vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Monolog/monolog libraries in the Packagist ecosystem. The issue involves monolog header injection in nativemailerhandler. Remediation is available by upgrading affected packages to version 1.12.0.
GHSA-f57v-q966-7fh6 at a Glance
How to Fix GHSA-f57v-q966-7fh6
To remediate this vulnerability, upgrade all affected Monolog/monolog 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 monolog/monolog to 1.12.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for monolog/monolog
How to Check if You Are Affected
To determine whether your application is affected by GHSA-f57v-q966-7fh6, inspect your project dependencies for Monolog/monolog:
inspect dependencies for monolog/monolog
Analyze the terminal output to locate any version of Monolog/monolog in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.12.0), 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-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Monolog/monolog, 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-f57v-q966-7fh6 Affected Monolog/monolog Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
monolog/monolog
|
Packagist |
≥ 1.8.0
< 1.12.0
|
1.12.0
|
References
Frequently Asked Questions
What is GHSA-f57v-q966-7fh6?
Which Monolog/monolog versions are affected?
What version fixes GHSA-f57v-q966-7fh6?
Is monolog/monolog affected?
What CWE is associated with GHSA-f57v-q966-7fh6?
How can I check Packagist dependencies for GHSA-f57v-q966-7fh6?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f57v-q966-7fh6",
"modified" : "2024-05-15T23:08:13Z",
"published" : "2024-05-15T23:08:13Z",
"aliases" : [ ],
"summary" : "Monolog Header injection in NativeMailerHandler",
"details" : "A header injection vulnerability has been identified in the NativeMailerHandler of the Monolog library. This vulnerability may allow an attacker to manipulate email headers when log messages are sent via email.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "monolog/monolog"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.8.0"
}, {
"fixed" : "1.12.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Seldaek/monolog/issues/458"
}, {
"type" : "WEB",
"url" : "https://github.com/Seldaek/monolog/pull/448#issuecomment-68208704"
}, {
"type" : "WEB",
"url" : "https://github.com/Seldaek/monolog/commit/515a096c864b00b3967f7f601680f85d4a2e4001"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/monolog/monolog/2014-12-29-1.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Seldaek/monolog"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-74" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-15T23:08:13Z",
"nvd_published_at" : null
}
}