CVE-2024-27298: ZDI-CAN-19105 SQL Injection Vulnerability
CRITICALCVE-2024-27298 is a CRITICAL (CVSS 10.0) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting ZDI-CAN-19105 libraries in the npm ecosystem. The issue involves parse server literalizeregexpart sql injection. Remediation is available by upgrading affected packages to version 6.5.0, 7.0.0-alpha.20.
CVE-2024-27298 at a Glance
Security Impact
CVSS: 10.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N).
How to Fix CVE-2024-27298
To remediate this vulnerability, upgrade all affected ZDI-CAN-19105 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install parse-server@6.5.0
npm install parse-server@7.0.0-alpha.20
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls parse-server
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-27298, inspect your project dependencies using npm:
npm ls parse-server
Analyze the terminal output to locate any version of ZDI-CAN-19105 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.5.0), your application is affected.
Note: The npm ls parse-server command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
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 ZDI-CAN-19105, 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
CVE-2024-27298 Affected ZDI-CAN-19105 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
parse-server
|
npm |
< 6.5.0
|
6.5.0
|
|
parse-server
|
npm |
≥ 7.0.0-alpha.1
< 7.0.0-alpha.20
|
7.0.0-alpha.20
|
References
Frequently Asked Questions
What is CVE-2024-27298?
Which ZDI-CAN-19105 versions are affected?
What version fixes CVE-2024-27298?
Is parse-server affected?
What is the CVSS score of CVE-2024-27298?
What CWE is associated with CVE-2024-27298?
How can I check npm dependencies for CVE-2024-27298?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6927-3vr9-fxf2",
"modified" : "2024-03-01T20:08:23Z",
"published" : "2024-03-01T20:08:23Z",
"aliases" : [ "CVE-2024-27298" ],
"summary" : "ZDI-CAN-19105: Parse Server literalizeRegexPart SQL Injection",
"details" : "### Impact\n\nThis vulnerability allows SQL injection when Parse Server is configured to use the PostgreSQL database.\n\n### Patches\n\nThe algorithm to detect SQL injection has been improved.\n\n### Workarounds\n\nNone.\n\n### References\n\n- https://github.com/parse-community/parse-server/security/advisories/GHSA-6927-3vr9-fxf2\n- https://github.com/parse-community/parse-server/releases/tag/6.5.0 (fixed in Parse Server 6)\n- https://github.com/parse-community/parse-server/releases/tag/7.0.0-alpha.20 (fixed in Parse Server 7 alpha release)\n\n### Credits\n\n- Mikhail Shcherbakov (https://twitter.com/yu5k3) working with Trend Micro Zero Day Initiative (finder)\n- Ehsan Persania (remediation developer)\n- Manuel Trezza (coordinator)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "parse-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.5.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "parse-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0-alpha.1"
}, {
"fixed" : "7.0.0-alpha.20"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/parse-community/parse-server/security/advisories/GHSA-6927-3vr9-fxf2"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-27298"
}, {
"type" : "WEB",
"url" : "https://github.com/parse-community/parse-server/commit/a6e654943536932904a69b51e513507fcf90a504"
}, {
"type" : "WEB",
"url" : "https://github.com/parse-community/parse-server/commit/cbefe770a7260b54748a058b8a7389937dc35833"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/parse-community/parse-server"
}, {
"type" : "WEB",
"url" : "https://github.com/parse-community/parse-server/releases/tag/6.5.0"
}, {
"type" : "WEB",
"url" : "https://github.com/parse-community/parse-server/releases/tag/7.0.0-alpha.20"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-03-01T20:08:23Z",
"nvd_published_at" : "2024-03-01T18:15:28Z"
}
}