CVE-2025-30217: Frappe SQL Injection Vulnerability

MODERATE
Advisory Identifier: GHSA-6phg-4wmq-h5h3
CWE-89
Published
Advisory Summary

CVE-2025-30217 is a MODERATE sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Frappe libraries in the PyPI ecosystem. The issue involves frappe has possibility of sql injection due to improper validations. Remediation is available by upgrading affected packages to version 14.93.2, 15.55.0.

CVE-2025-30217 at a Glance

CVE Identifier CVE-2025-30217
GHSA Identifier GHSA-6phg-4wmq-h5h3
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Frappe
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2025-30217

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

frappe fixed: 14.93.2
pip install frappe>=14.93.2
frappe fixed: 15.55.0
pip install frappe>=15.55.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 frappe

How to Check if You Are Affected

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

pip show frappe

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

Note: The pip show frappe 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 Frappe, 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

### Impact SQL injection could be achieved via a specially crafted request, which could allow malicious person to gain access to sensitive information. ### Workarounds Upgrading is required, no other workaround is present.

CVE-2025-30217 Affected Frappe Versions

2 component(s)
Fixed Versions:
14.93.215.55.0
Product / Package Ecosystem Affected Versions Fixed Version
frappe
PyPI
< 14.93.2
14.93.2
frappe
PyPI
≥ 15.0.0
< 15.55.0
15.55.0

References

Frequently Asked Questions

What is CVE-2025-30217?
CVE-2025-30217 is a security vulnerability in Frappe involving Frappe has possibility of SQL injection due to improper validations under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Frappe versions are affected?
Affected versions include releases prior to 14.93.2, 15.55.0 across affected packages: frappe.
What version fixes CVE-2025-30217?
Upgrading to 14.93.2, 15.55.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is frappe affected?
Yes, frappe is affected in releases prior to 14.93.2, 15.55.0. Upgrade your dependency to 14.93.2, 15.55.0 or later.
What CWE is associated with CVE-2025-30217?
CVE-2025-30217 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-30217?
Run the dependency tree command: 'pip show frappe'. 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-6phg-4wmq-h5h3",
  "modified" : "2025-03-31T13:12:11Z",
  "published" : "2025-03-26T17:13:08Z",
  "aliases" : [ "CVE-2025-30217" ],
  "summary" : "Frappe has possibility of SQL injection due to improper validations",
  "details" : "### Impact\nSQL injection could be achieved via a specially crafted request, which could allow malicious person to gain access to sensitive information.\n\n### Workarounds\nUpgrading is required, no other workaround is present.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "frappe"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.93.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "frappe"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "15.0.0"
      }, {
        "fixed" : "15.55.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/frappe/frappe/security/advisories/GHSA-6phg-4wmq-h5h3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-30217"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/frappe/frappe"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-26T17:13:08Z",
    "nvd_published_at" : "2025-03-26T17:15:26Z"
  }
}