CVE-2024-53924: Pycel Pycel Allows Code Injection Vulnerability

HIGH
Advisory Identifier: GHSA-pw67-xjhq-389w
CWE-94
Published
Advisory Summary

CVE-2024-53924 is a HIGH pycel allows code injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Pycel libraries in the PyPI ecosystem. The issue involves pycel allows code injection via a crafted formula. Remediation is available in the latest vendor maintenance releases.

CVE-2024-53924 at a Glance

CVE Identifier CVE-2024-53924
GHSA Identifier GHSA-pw67-xjhq-389w
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Pycel
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2024-53924

To remediate this vulnerability, upgrade all affected Pycel dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

pycel fixed: Latest secure release
pip install pycel>=Latest secure release
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 pycel

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-53924, inspect your installed packages using pip:

pip show pycel

Analyze the terminal output to locate any version of Pycel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The pip show pycel command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Pycel, 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

Pycel through 1.0b30, when operating on an untrusted spreadsheet, allows code execution via a crafted formula in a cell, such as one beginning with the `=IF(A1=200, eval("__import__('os').system(` substring.

CVE-2024-53924 Affected Pycel Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
pycel
PyPI
≤ 1.0b30

References

Frequently Asked Questions

What is CVE-2024-53924?
CVE-2024-53924 is a security vulnerability in Pycel involving Pycel allows code injection via a crafted formula under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Pycel versions are affected?
Affected versions include releases prior to current release patches across affected packages: pycel.
What version fixes CVE-2024-53924?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is pycel affected?
Yes, pycel is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2024-53924?
CVE-2024-53924 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check PyPI dependencies for CVE-2024-53924?
Run the dependency tree command: 'pip show pycel'. 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-pw67-xjhq-389w",
  "modified" : "2026-06-08T19:04:26Z",
  "published" : "2025-04-17T18:31:23Z",
  "aliases" : [ "CVE-2024-53924" ],
  "summary" : "Pycel allows code injection via a crafted formula",
  "details" : "Pycel through 1.0b30, when operating on an untrusted spreadsheet, allows code execution via a crafted formula in a cell, such as one beginning with the `=IF(A1=200, eval(\"__import__('os').system(` substring.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pycel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.0b30"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-53924"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/aelmosalamy/cb098e61939718d2bb248fd1cc94f287"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dgorissen/pycel"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pycel/PYSEC-2025-177.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/stephenrauch/pycel"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/pycel"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-04-22T17:04:11Z",
    "nvd_published_at" : "2025-04-17T18:15:47Z"
  }
}