CVE-2021-25962: Shuup CSV Injection Vulnerability

HIGH
Advisory Identifier: GHSA-663j-rjcr-789f
CVSS 8.0
CWE-1236
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2021-25962
GHSA Identifier GHSA-663j-rjcr-789f
Severity HIGH
CVSS v3.1 Base Score 8.0
CWE Classification CWE-1236: Improper Neutralization of Formula Elements in a CSV File
Affected Product Shuup
Package Ecosystem PyPI
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (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.

shuup fixed: 2.11.0
pip install shuup>=2.11.0
Verify Direct and Transitive Dependencies

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

“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.

CVE-2021-25962 Affected Shuup Versions

1 component(s)
Fixed Versions:
2.11.0
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?
CVE-2021-25962 is a security vulnerability in Shuup involving CSV injection in shuup under CWE-1236: Improper Neutralization of Formula Elements in a CSV File.
Which Shuup versions are affected?
Affected versions include releases prior to 2.11.0 across affected packages: shuup.
What version fixes CVE-2021-25962?
Upgrading to 2.11.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is shuup affected?
Yes, shuup is affected in releases prior to 2.11.0. Upgrade your dependency to 2.11.0 or later.
What is the CVSS score of CVE-2021-25962?
CVE-2021-25962 has a CVSS v3.1 base score of 8.0 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-25962?
CVE-2021-25962 is classified under CWE-1236: Improper Neutralization of Formula Elements in a CSV File (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.).
How can I check PyPI dependencies for CVE-2021-25962?
Run the dependency tree command: 'pip show shuup'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}