CVE-2017-20187: Floriangaerber/magnesium Magnesium-PHP Injection Vulnerability Vulnerability
LOWCVE-2017-20187 is a LOW (CVSS 3.5) magnesium-php injection vulnerability vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Floriangaerber/magnesium libraries in the Packagist ecosystem. The issue involves magnesium-php injection vulnerability. Remediation is available by upgrading affected packages to version 0.3.1.
CVE-2017-20187 at a Glance
Security Impact
CVSS: 3.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2017-20187
To remediate this vulnerability, upgrade all affected Floriangaerber/magnesium 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 floriangaerber/magnesium to 0.3.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for floriangaerber/magnesium
How to Check if You Are Affected
To determine whether your application is affected by CVE-2017-20187, inspect your project dependencies for Floriangaerber/magnesium:
inspect dependencies for floriangaerber/magnesium
Analyze the terminal output to locate any version of Floriangaerber/magnesium in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.1), 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 Floriangaerber/magnesium, 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-2017-20187 Affected Floriangaerber/magnesium Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
floriangaerber/magnesium
|
Packagist |
< 0.3.1
|
0.3.1
|
References
Frequently Asked Questions
What is CVE-2017-20187?
Which Floriangaerber/magnesium versions are affected?
What version fixes CVE-2017-20187?
Is floriangaerber/magnesium affected?
What is the CVSS score of CVE-2017-20187?
What CWE is associated with CVE-2017-20187?
How can I check Packagist dependencies for CVE-2017-20187?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8pp6-5qpw-85g3",
"modified" : "2023-11-14T21:07:32Z",
"published" : "2023-11-05T21:30:22Z",
"aliases" : [ "CVE-2017-20187" ],
"summary" : "Magnesium-PHP Injection vulnerability",
"details" : "** UNSUPPORTED WHEN ASSIGNED ** ** UNSUPPORTED WHEN ASSIGNED ** A vulnerability was found in Magnesium-PHP up to 0.3.0. It has been classified as problematic. Affected is the function formatEmailString of the file `src/Magnesium/Message/Base.php`. The manipulation of the argument email/name leads to injection. Upgrading to version 0.3.1 is able to address this issue. The patch is identified as 500d340e1f6421007413cc08a8383475221c2604. It is recommended to upgrade the affected component. VDB-244482 is the identifier assigned to this vulnerability. NOTE: This vulnerability only affects products that are no longer supported by the maintainer.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "floriangaerber/magnesium"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.3.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-20187"
}, {
"type" : "WEB",
"url" : "https://github.com/floriangaerber/Magnesium-PHP/commit/500d340e1f6421007413cc08a8383475221c2604"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/floriangaerber/Magnesium-PHP"
}, {
"type" : "WEB",
"url" : "https://github.com/floriangaerber/Magnesium-PHP/releases/tag/v0.3.1"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?ctiid.244482"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?id.244482"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-74" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2023-11-08T14:39:57Z",
"nvd_published_at" : "2023-11-05T21:15:09Z"
}
}