CVE-2021-25962: Shuup CSV Injection Vulnerability
HIGHCVE-2021-25962 is a HIGH (CVSS 8.0) csv injection vulnerability (CWE-1236: Improper Neutralization of Formula Elements in a CSV File) affecting Shuup libraries in the PyPI ecosystem. The issue involves csv injection in shuup. Remediation is available by upgrading affected packages to version 2.11.0.
CVE-2021-25962 at a Glance
Security Impact
CVSS: 8.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2021-25962
To remediate this vulnerability, upgrade all affected Shuup dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install shuup>=2.11.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show shuup
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2021-25962, inspect your installed packages using pip:
pip show shuup
Analyze the terminal output to locate any version of Shuup in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.11.0), your application is affected.
Note: The pip show shuup command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1236: Improper Neutralization of Formula Elements in a CSV File, where the product saves user-provided information into a comma-separated value (csv) file, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as a command when the file is opened by a spreadsheet product. In Shuup, 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-2021-25962 Affected Shuup Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
shuup
|
PyPI |
≥ 0.4.2
< 2.11.0
|
2.11.0
|
References
Frequently Asked Questions
What is CVE-2021-25962?
Which Shuup versions are affected?
What version fixes CVE-2021-25962?
Is shuup affected?
What is the CVSS score of CVE-2021-25962?
What CWE is associated with CVE-2021-25962?
How can I check PyPI dependencies for CVE-2021-25962?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-663j-rjcr-789f",
"modified" : "2024-10-23T18:35:09Z",
"published" : "2021-09-30T20:50:07Z",
"aliases" : [ "CVE-2021-25962" ],
"summary" : "CSV injection in shuup",
"details" : "“Shuup” application in versions 0.4.2 to 2.10.8 is affected by the “Formula Injection” vulnerability. A customer can inject payloads in the name input field in the billing address while buying a product. When a store administrator accesses the reports page to export the data as an Excel file and opens it, the payload gets executed.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "shuup"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.4.2"
}, {
"fixed" : "2.11.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-25962"
}, {
"type" : "WEB",
"url" : "https://github.com/shuup/shuup/commit/0a2db392e8518410c282412561461cd8797eea51"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/shuup/PYSEC-2021-355.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/shuup/shuup"
}, {
"type" : "WEB",
"url" : "https://www.whitesourcesoftware.com/vulnerability-database/CVE-2021-25962"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1236" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-09-30T18:33:24Z",
"nvd_published_at" : "2021-09-29T14:15:00Z"
}
}