GHSA-5pjj-7fq8-9gpf CVE-2021-36028
Magento has an XML Injection vulnerability
- Severity
- 0.0 / 10
- Critical · CVSS 4.0
- Exploit chance (EPSS)
- 2.89%
- Chance of exploitation in the next 30 days. Higher than 86.92% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-91 XML Injection (aka Blind XPath Injection)
- Fix
2.3.7-p1- Upgrade magento/community-edition to this version or later
Description
Magento Commerce versions 2.4.2 (and earlier), 2.4.2-p1 (and earlier) and 2.3.7 (and earlier) are affected by an XML Injection vulnerability when saving a configurable product. An attacker with admin privileges can trigger a specially crafted script to achieve remote code execution.
Affected versions
Packagist
| Package | Vulnerable | Fixed in |
|---|---|---|
| magento/community-edition | < 2.3.7-p1 |
2.3.7-p1 |
| magento/community-edition | 1 listed versions | No fix yet |
| magento/community-edition | >= 2.4.2-p1, < 2.4.2-p2 |
2.4.2-p2 |
| magento/community-edition | 1 listed versions | No fix yet |
| magento/project-community-edition | <= 2.0.2 |
No fix yet |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
magento/community-edition Packagist → 2.3.7-p1
- composer
composer require magento/community-edition:^2.3.7-p1
Severity breakdown
CVSS 4.0 0.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- None
- User interaction
- None
- Confidentiality (vulnerable system)
- High
- Integrity (vulnerable system)
- High
- Availability (vulnerable system)
- High
- Confidentiality (subsequent systems)
- None
- Integrity (subsequent systems)
- None
- Availability (subsequent systems)
- None
Weakness
CWE-91: XML Injection (aka Blind XPath Injection)
The product does not properly neutralize special elements that are used in XML, allowing attackers to modify the syntax, content, or commands of the XML before it is processed by an end system.
How to prevent it
- Implementation: Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
References
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-wh92-6q6g-px7j Magento Community Edition Improper Input Validation vulnerability | Critical Known exploited | Also affects magento/community-edition |
| GHSA-m8cj-3v68-3cxj Magento Open Source affected by an Improper Restriction of XML External Entity Reference ('XXE') vulnerability | Critical Known exploited | Also affects magento/community-edition |
| GHSA-f8fv-f786-9933 Magento improper input validation vulnerability | Critical Known exploited | Also affects magento/community-edition |
| GHSA-qvwr-p3hj-j6jf Magento vulnerable to privilege escalation due to incorrect authorization | Medium | Also affects magento/community-edition |
| GHSA-pcrx-r49h-x2w5 Magento vulnerable to stored Cross-Site Scripting (XSS) | Medium | Also affects magento/community-edition |
| GHSA-r355-75hw-r8jf Magento allows incorrect authorization | Medium | Also affects magento/community-edition |
| GHSA-2768-5wmv-cfff Magento vulnerable to stored Cross-Site Scripting (XSS) | High | Also affects magento/community-edition |
| GHSA-69x9-xp2j-w8g8 Magento provides incorrect authorization through a security feature bypass | High | Also affects magento/community-edition |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor