CVE-2025-32020: crud-query-parser SQL Injection Vulnerability
Summary
CVE-2025-32020: crud-query-parser SQL Injection vulnerability. Affects crud-query-parser versions < 0.1.0. Fixed in 0.1.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The crud-query-parser package is a tool designed for parsing CRUD (Create, Read, Update, Delete) requests in applications using TypeORM. It allows developers to easily manage database queries based on user input. However, the package has a significant vulnerability that arises from improper handling of the 'order' or 'sort' parameters, making it susceptible to SQL injection attacks.
Vulnerability Detail
The vulnerability stems from the improper neutralization of the 'order' or 'sort' parameter in the TypeORM adapter. This flaw allows attackers to manipulate SQL queries, potentially leading to unauthorized data access or data manipulation. The affected versions, specifically 0.0.1, 0.0.2, and 0.0.3, do not implement adequate field validation, exposing applications to SQL injection risks.
How To Fix
Latest published version: 1.1.1 as of 23 Oct 2026
npm install crud-query-parser@1.1.1
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
0.1.0
This is the first release that contains the fix.
npm install crud-query-parser@0.1.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If immediate updating is not feasible, consider implementing the following workarounds: 1. Add an allowlist of fields to filter out invalid fields before passing the crudRequest to the TypeOrmQueryAdapter. Example code: crudRequest =
filterProperties(crudRequest, ['id', 'title', 'category.name']);
- Disable ordering by cleaning up the 'order' field before passing it to the TypeOrmQueryAdapter. Example code: crudRequest.order = [];
Conclusion
The crud-query-parser package has a critical SQL injection vulnerability that affects specific versions. It is essential to update to the patched version or implement workarounds to mitigate risks. Regular monitoring for vulnerabilities using tools like Vulert can help maintain application security.
See every vulnerability recorded for crud-query-parser →
FAQ
SQL injection is a code injection technique that exploits vulnerabilities in an application's software by allowing attackers to manipulate SQL queries.
You can check if your application is affected by using Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to use the Vulert playground without signup.
The risks include unauthorized access to sensitive data, data manipulation, and potential complete control over the database by an attacker.
No, older versions (0.0.1, 0.0.2, 0.0.3) are vulnerable to SQL injection and should be updated to version 0.1.0 or newer.
The filterProperties function is used to create an allowlist of valid fields, ensuring that only safe and expected fields are processed in the query.