CVE-2023-22474: Parse server Parse Server Option `masterKeyIps` Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-vm5r-c87r-pf6x
CVSS 8.7
CWE-290
Published
Advisory Summary

CVE-2023-22474 is a HIGH (CVSS 8.7) parse server option `masterkeyips` vulnerability vulnerability (CWE-290: Authentication Bypass by Spoofing) affecting Parse server libraries in the npm ecosystem. The issue involves parse server option `masterkeyips` vulnerability to ip spoofing. Remediation is available by upgrading affected packages to version 5.4.1.

CVE-2023-22474 at a Glance

CVE Identifier CVE-2023-22474
GHSA Identifier GHSA-vm5r-c87r-pf6x
Severity HIGH
CVSS v3.1 Base Score 8.7
CWE Classification CWE-290: Authentication Bypass by Spoofing
Affected Product Parse server
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2023-22474

To remediate this vulnerability, upgrade all affected Parse server 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: 5.4.1
npm install parse-server@5.4.1
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-2023-22474, inspect your project dependencies using npm:

npm ls parse-server

Analyze the terminal output to locate any version of Parse server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.4.1), 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-290: Authentication Bypass by Spoofing, where this attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks. In Parse server, 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 Parse Server uses the request header `x-forwarded-for` to determine the client IP address. If Parse Server doesn't run behind a proxy server, then a client can set this header and Parse Server will trust the value of the header. The incorrect client IP address will be used by various features in Parse Server. This allows to circumvent the security mechanism of the Parse Server option `masterKeyIps` by setting an allowed IP address as the `x-forwarded-for` header value. ### Patches The mechanism to determine the client IP address has been rewritten. The correct IP address determination now requires to set the Parse Server option `trustProxy` accordingly, see the express framework's [trust proxy](https://expressjs.com/en/guide/behind-proxies.html) setting. ### References - https://github.com/parse-community/parse-server/security/advisories/GHSA-vm5r-c87r-pf6x - https://expressjs.com/en/guide/behind-proxies.html

CVE-2023-22474 Affected Parse server Versions

1 component(s)
Fixed Versions:
5.4.1
Product / Package Ecosystem Affected Versions Fixed Version
parse-server
npm
< 5.4.1
5.4.1

References

Frequently Asked Questions

What is CVE-2023-22474?
CVE-2023-22474 is a security vulnerability in Parse server involving Parse Server option `masterKeyIps` vulnerability to IP spoofing under CWE-290: Authentication Bypass by Spoofing.
Which Parse server versions are affected?
Affected versions include releases prior to 5.4.1 across affected packages: parse-server.
What version fixes CVE-2023-22474?
Upgrading to 5.4.1 (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 5.4.1. Upgrade your dependency to 5.4.1 or later.
What is the CVSS score of CVE-2023-22474?
CVE-2023-22474 has a CVSS v3.1 base score of 8.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2023-22474?
CVE-2023-22474 is classified under CWE-290: Authentication Bypass by Spoofing (This attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks.).
How can I check npm dependencies for CVE-2023-22474?
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-vm5r-c87r-pf6x",
  "modified" : "2023-02-04T00:14:05Z",
  "published" : "2023-01-31T22:21:48Z",
  "aliases" : [ "CVE-2023-22474" ],
  "summary" : "Parse Server option `masterKeyIps` vulnerability to IP spoofing",
  "details" : "### Impact\n\nParse Server uses the request header `x-forwarded-for` to determine the client IP address. If Parse Server doesn't run behind a proxy server, then a client can set this header and Parse Server will trust the value of the header. The incorrect client IP address will be used by various features in Parse Server. This allows to circumvent the security mechanism of the Parse Server option `masterKeyIps` by setting an allowed IP address as the `x-forwarded-for` header value.\n\n### Patches\n\nThe mechanism to determine the client IP address has been rewritten. The correct IP address determination now requires to set the Parse Server option `trustProxy` accordingly, see the express framework's [trust proxy](https://expressjs.com/en/guide/behind-proxies.html) setting.\n\n### References\n- https://github.com/parse-community/parse-server/security/advisories/GHSA-vm5r-c87r-pf6x\n- https://expressjs.com/en/guide/behind-proxies.html",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "parse-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.4.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/security/advisories/GHSA-vm5r-c87r-pf6x"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-22474"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/commit/e016d813e083ce6828f9abce245d15b681a224d8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/parse-community/parse-server"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-290" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-31T22:21:48Z",
    "nvd_published_at" : "2023-02-03T20:15:00Z"
  }
}