CVE-2025-30212: Frappe has possibility of SQL injection due to improper validations
6.6
CVSS Score
4.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.14058%
CWE
Published
3/25/2025
Updated
3/25/2025
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| frappe | pip | ||
| frappe | pip |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The key vulnerability stems from the build_filter_conditions method in db_query.py. The patch shows that raw string filters were previously appended directly to SQL conditions (conditions.append(f)), which is unsafe. The fix introduced sanitize_column(f) to validate/escape column names. This matches the CWE-89 (SQL Injection) description, as improper neutralization of user input in SQL commands was the root cause. Other changes (e.g., HTML sanitization in setup_wizard) are unrelated to SQL injection mitigation. The db_query.py change is the most direct and conclusive fix for the described vulnerability.