CVE-2024-39309: ZDI-CAN-23894 Authentication Bypass Vulnerability

CRITICAL
Advisory Identifier: GHSA-c2hr-cqg6-8j6r
CVSS 9.8
CWE-288
Published
Advisory Summary

CVE-2024-39309 is a CRITICAL (CVSS 9.8) authentication bypass vulnerability (CWE-288: Authentication Bypass Using an Alternate Path or Channel) affecting ZDI-CAN-23894 libraries in the npm ecosystem. The issue involves parse server literalizeregexpart sql injection authentication bypass vulnerability. Remediation is available by upgrading affected packages to version 6.5.7, 7.1.0.

CVE-2024-39309 at a Glance

CVE Identifier CVE-2024-39309
GHSA Identifier GHSA-c2hr-cqg6-8j6r
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-288: Authentication Bypass Using an Alternate Path or Channel
Affected Product ZDI-CAN-23894
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.8

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:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
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-2024-39309

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

parse-server fixed: 6.5.7
npm install parse-server@6.5.7
parse-server fixed: 7.1.0
npm install parse-server@7.1.0
Verify Direct and Transitive Dependencies

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-39309, inspect your project dependencies using npm:

npm ls parse-server

Analyze the terminal output to locate any version of ZDI-CAN-23894 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.5.7), 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-288: Authentication Bypass Using an Alternate Path or Channel, where the product requires authentication, but the product has an alternate path or channel that does not require authentication. In ZDI-CAN-23894, 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 This vulnerability allows SQL injection when Parse Server is configured to use the PostgreSQL database. ### Patches The algorithm to detect SQL injection has been improved. ### Workarounds None. ### References - https://github.com/parse-community/parse-server/security/advisories/GHSA-c2hr-cqg6-8j6r - https://github.com/parse-community/parse-server/pull/9167 (fix for Parse Server 7) - https://github.com/parse-community/parse-server/pull/9168 (fix for Parse Server 6) ### Credits - Smile Thanapattheerakul of Trend Micro (finder) - Manuel Trezza (coordinator)

CVE-2024-39309 Affected ZDI-CAN-23894 Versions

2 component(s)
Fixed Versions:
6.5.77.1.0
Product / Package Ecosystem Affected Versions Fixed Version
parse-server
npm
< 6.5.7
6.5.7
parse-server
npm
≥ 7.0.0
< 7.1.0
7.1.0

References

Frequently Asked Questions

What is CVE-2024-39309?
CVE-2024-39309 is a security vulnerability in ZDI-CAN-23894 involving Parse Server literalizeRegexPart SQL Injection Authentication Bypass Vulnerability under CWE-288: Authentication Bypass Using an Alternate Path or Channel.
Which ZDI-CAN-23894 versions are affected?
Affected versions include releases prior to 6.5.7, 7.1.0 across affected packages: parse-server.
What version fixes CVE-2024-39309?
Upgrading to 6.5.7, 7.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is parse-server affected?
Yes, parse-server is affected in releases prior to 6.5.7, 7.1.0. Upgrade your dependency to 6.5.7, 7.1.0 or later.
What is the CVSS score of CVE-2024-39309?
CVE-2024-39309 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-39309?
CVE-2024-39309 is classified under CWE-288: Authentication Bypass Using an Alternate Path or Channel (The product requires authentication, but the product has an alternate path or channel that does not require authentication.).
How can I check npm dependencies for CVE-2024-39309?
Run the dependency tree command: 'npm ls parse-server'. 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-c2hr-cqg6-8j6r",
  "modified" : "2024-07-02T02:40:41Z",
  "published" : "2024-07-01T18:35:04Z",
  "aliases" : [ "CVE-2024-39309" ],
  "summary" : "ZDI-CAN-23894: Parse Server literalizeRegexPart SQL Injection Authentication Bypass Vulnerability",
  "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-c2hr-cqg6-8j6r\n- https://github.com/parse-community/parse-server/pull/9167 (fix for Parse Server 7)\n- https://github.com/parse-community/parse-server/pull/9168 (fix for Parse Server 6)\n\n### Credits\n\n- Smile Thanapattheerakul of Trend Micro (finder)\n- Manuel Trezza (coordinator)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "parse-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.5.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "parse-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0"
      }, {
        "fixed" : "7.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/security/advisories/GHSA-c2hr-cqg6-8j6r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-39309"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/pull/9167"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/pull/9168"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/commit/2edf1e4c0363af01e97a7fbc97694f851b7d1ff3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/commit/f332d54577608c5ad927255e06d8c694e2e0ff5b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/parse-community/parse-server"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-288" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-01T18:35:04Z",
    "nvd_published_at" : "2024-07-01T22:15:03Z"
  }
}