CVE-2025-24793: Snowflake connector python SQL Injection Vulnerability

HIGH
Advisory Identifier: GHSA-2vpq-fh52-j3wv
CVSS 7.0
CWE-89
Published
Advisory Summary

CVE-2025-24793 is a HIGH (CVSS 7.0) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Snowflake connector python libraries in the PyPI ecosystem. The issue involves snowflake-connector-python vulnerable to sql injection in write_pandas. Remediation is available by upgrading affected packages to version 3.13.1.

CVE-2025-24793 at a Glance

CVE Identifier CVE-2025-24793
GHSA Identifier GHSA-2vpq-fh52-j3wv
Severity HIGH
CVSS v3.1 Base Score 7.0
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Snowflake connector python
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2025-24793

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

snowflake-connector-python fixed: 3.13.1
pip install snowflake-connector-python>=3.13.1
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 snowflake-connector-python

How to Check if You Are Affected

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

pip show snowflake-connector-python

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

Note: The pip show snowflake-connector-python command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Snowflake connector python, 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

### Issue Snowflake discovered and remediated a vulnerability in the Snowflake Connector for Python. A function from the snowflake.connector.pandas_tools module is vulnerable to SQL injection. This vulnerability affects versions 2.2.5 through 3.13.0. Snowflake fixed the issue in version 3.13.1. ### Vulnerability Details A function from the snowflake.connector.pandas_tools module is not sanitizing all of its arguments, and queries using them are not parametrized. An attacker controlling these arguments could achieve SQL injection by passing crafted input. Any SQL executed that way by an attacker would still run in the context of the current session. ### Solution Snowflake released version 3.13.1 of the Snowflake Connector for Python, which fixes this issue. We recommend users upgrade to version 3.13.1. ### Additional Information If you discover a security vulnerability in one of our products or websites, please report the issue to HackerOne. For more information, please see our [Vulnerability Disclosure Policy](https://hackerone.com/snowflake?type=team).

CVE-2025-24793 Affected Snowflake connector python Versions

1 component(s)
Fixed Versions:
3.13.1
Product / Package Ecosystem Affected Versions Fixed Version
snowflake-connector-python
PyPI
≥ 2.2.5
< 3.13.1
3.13.1

References

Frequently Asked Questions

What is CVE-2025-24793?
CVE-2025-24793 is a security vulnerability in Snowflake connector python involving snowflake-connector-python vulnerable to SQL Injection in write_pandas under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Snowflake connector python versions are affected?
Affected versions include releases prior to 3.13.1 across affected packages: snowflake-connector-python.
What version fixes CVE-2025-24793?
Upgrading to 3.13.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is snowflake-connector-python affected?
Yes, snowflake-connector-python is affected in releases prior to 3.13.1. Upgrade your dependency to 3.13.1 or later.
What is the CVSS score of CVE-2025-24793?
CVE-2025-24793 has a CVSS v3.1 base score of 7.0 (HIGH) with vector string CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2025-24793?
CVE-2025-24793 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check PyPI dependencies for CVE-2025-24793?
Run the dependency tree command: 'pip show snowflake-connector-python'. 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-2vpq-fh52-j3wv",
  "modified" : "2025-04-09T20:10:21Z",
  "published" : "2025-01-29T20:50:33Z",
  "aliases" : [ "CVE-2025-24793" ],
  "summary" : "snowflake-connector-python vulnerable to SQL Injection in write_pandas",
  "details" : "### Issue\nSnowflake discovered and remediated a vulnerability in the Snowflake Connector for Python. A function from the snowflake.connector.pandas_tools module is vulnerable to SQL injection.\n\nThis vulnerability affects versions 2.2.5 through 3.13.0. Snowflake fixed the issue in version 3.13.1.\n\n### Vulnerability Details\nA function from the snowflake.connector.pandas_tools module is not sanitizing all of its arguments, and queries using them are not parametrized. An attacker controlling these arguments could achieve SQL injection by passing crafted input. Any SQL executed that way by an attacker would still run in the context of the current session.\n\n### Solution\nSnowflake released version 3.13.1 of the Snowflake Connector for Python, which fixes this issue. We recommend users upgrade to version 3.13.1.\n\n### Additional Information\nIf you discover a security vulnerability in one of our products or websites, please report the issue to HackerOne. For more information, please see our [Vulnerability Disclosure Policy](https://hackerone.com/snowflake?type=team).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "snowflake-connector-python"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.5"
      }, {
        "fixed" : "3.13.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.13.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/snowflakedb/snowflake-connector-python/security/advisories/GHSA-2vpq-fh52-j3wv"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-24793"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/snowflakedb/snowflake-connector-python/commit/f3f9b666518d29c31a49384bbaa9a65889e72056"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/snowflake-connector-python/PYSEC-2025-26.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/snowflakedb/snowflake-connector-python"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/snowflakedb/snowflake-connector-python/releases/tag/v3.13.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-01-29T20:50:33Z",
    "nvd_published_at" : "2025-01-29T21:15:21Z"
  }
}