CVE-2022-39231: Parse server Parse-server Auth Adapter App ID Vulnerability

LOW
Advisory Identifier: GHSA-r657-33vp-gp22
CVSS 3.7
CWE-287
Published
Advisory Summary

CVE-2022-39231 is a LOW (CVSS 3.7) parse-server auth adapter app id vulnerability (CWE-287: Improper Authentication) affecting Parse server libraries in the npm ecosystem. The issue involves parse-server auth adapter app id validation can be circumvented. Remediation is available by upgrading affected packages to version 4.10.16, 5.2.7.

CVE-2022-39231 at a Glance

CVE Identifier CVE-2022-39231
GHSA Identifier GHSA-r657-33vp-gp22
Severity LOW
CVSS v3.1 Base Score 3.7
CWE Classification CWE-287: Improper Authentication
Affected Product Parse server
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 3.7

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

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

How to Fix CVE-2022-39231

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: 4.10.16
npm install parse-server@4.10.16
parse-server fixed: 5.2.7
npm install parse-server@5.2.7
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-2022-39231, 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 4.10.16), 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. 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 Validation of the authentication adapter app ID for _Facebook_ and _Spotify_ may be circumvented. This fixes a vulnerability that affects configurations which allow users to authenticate using the Parse Server authentication adapter for _Facebook_ or _Spotify_ and where the server-side authentication adapter configuration `appIds` is set as a string (e.g. `abc`) instead of an array of strings (e.g. `["abc"]`). The vulnerability makes it possible to authenticate requests which are coming from a _Facebook_ or _Spotify_ app with a different app ID than the one specified in the `appIds` configuration. Both adapters still validate the access token with the respective authentication provider. An app ID is automatically assigned by the authentication provider. For this vulnerability to be exploited, an attacker would have to be assigned an app ID by the authentication provider which is a sub-set of the server-side configured app ID. The documentation did not explicitly specify that the parameter `appIds` must be set as an array of strings and setting a string also worked. Therefore, there is a possibility that there are deployments where `appIds` is set as a string, making them vulnerable. ### Patches The fix makes Parse Server check the type of the value set for `appIds` and throws an error if the value is not an array. ### Workarounds No known workarounds. ### References - GitHub advisory [GHSA-r657-33vp-gp22](https://github.com/parse-community/parse-server/security/advisories/GHSA-r657-33vp-gp22)

CVE-2022-39231 Affected Parse server Versions

2 component(s)
Fixed Versions:
4.10.165.2.7
Product / Package Ecosystem Affected Versions Fixed Version
parse-server
npm
< 4.10.16
4.10.16
parse-server
npm
≥ 5.0.0
< 5.2.7
5.2.7

References

Frequently Asked Questions

What is CVE-2022-39231?
CVE-2022-39231 is a security vulnerability in Parse server involving parse-server auth adapter app ID validation can be circumvented under CWE-287: Improper Authentication.
Which Parse server versions are affected?
Affected versions include releases prior to 4.10.16, 5.2.7 across affected packages: parse-server.
What version fixes CVE-2022-39231?
Upgrading to 4.10.16, 5.2.7 (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 4.10.16, 5.2.7. Upgrade your dependency to 4.10.16, 5.2.7 or later.
What is the CVSS score of CVE-2022-39231?
CVE-2022-39231 has a CVSS v3.1 base score of 3.7 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2022-39231?
CVE-2022-39231 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check npm dependencies for CVE-2022-39231?
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-r657-33vp-gp22",
  "modified" : "2022-09-21T20:43:57Z",
  "published" : "2022-09-21T20:43:57Z",
  "aliases" : [ "CVE-2022-39231" ],
  "summary" : "parse-server auth adapter app ID validation can be circumvented",
  "details" : "### Impact\n\nValidation of the authentication adapter app ID for _Facebook_ and _Spotify_ may be circumvented.\n\nThis fixes a vulnerability that affects configurations which allow users to authenticate using the Parse Server authentication adapter for _Facebook_ or _Spotify_ and where the server-side authentication adapter configuration `appIds` is set as a string (e.g. `abc`) instead of an array of strings (e.g. `[\"abc\"]`). The vulnerability makes it possible to authenticate requests which are coming from a _Facebook_ or _Spotify_ app with a different app ID than the one specified in the `appIds` configuration.\n\nBoth adapters still validate the access token with the respective authentication provider. An app ID is automatically assigned by the authentication provider. For this vulnerability to be exploited, an attacker would have to be assigned an app ID by the authentication provider which is a sub-set of the server-side configured app ID.\n\nThe documentation did not explicitly specify that the parameter `appIds` must be set as an array of strings and setting a string also worked. Therefore, there is a possibility that there are deployments where `appIds` is set as a string, making them vulnerable.\n\n### Patches\n\nThe fix makes Parse Server check the type of the value set for `appIds` and throws an error if the value is not an array.\n\n### Workarounds\n\nNo known workarounds.\n\n### References\n\n- GitHub advisory [GHSA-r657-33vp-gp22](https://github.com/parse-community/parse-server/security/advisories/GHSA-r657-33vp-gp22)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "parse-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.10.16"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "parse-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.2.7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/security/advisories/GHSA-r657-33vp-gp22"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39231"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/commit/8c8ec715739e0f851338cfed794409ebac66c51b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/parse-community/parse-server"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/releases/tag/4.10.16"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/releases/tag/5.2.7"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-09-21T20:43:57Z",
    "nvd_published_at" : "2022-09-23T08:15:00Z"
  }
}