Vulnerabilities

17 via 23 paths

Dependencies

361

Source

GitHub

Find, fix and prevent vulnerabilities in your code.

Issue type
  • 17
  • 1
Severity
  • 1
  • 8
  • 9
Status
  • 18
  • 0
  • 0

critical severity
new

Improper Certificate Validation

  • Vulnerable module: node-forge
  • Introduced through: @parse/push-adapter@8.6.0

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › @parse/push-adapter@8.6.0 › @parse/node-apn@8.2.0 › node-forge@1.4.2

Overview

node-forge is a JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

Affected versions of this package are vulnerable to Improper Certificate Validation via pki.verifyCertificateChain() in lib/x509.js, which does not decode or enforce the X.509 nameConstraints extension (OID 2.5.29.30) during certificate path validation. A certificate authority whose nameConstraints extension is marked non-critical can issue a leaf certificate with a subjectAltName dNSName or subject commonName outside its permitted subtrees or inside its excluded subtrees, and the chain passes verification. This allows an attacker holding such a CA's private key, or able to obtain a certificate issued under it, to impersonate arbitrary names - including in TLS peer verification via forge.tls - defeating the namespace restriction the constraint was intended to enforce.

Note: This is only exploitable when a name-constrained CA with a non-critical nameConstraints extension chains to a root trusted by the application, and the attacker controls that CA's private key or can obtain an out-of-scope certificate from it. Chains without nameConstraints are unaffected, and chains with a critical nameConstraints extension were already rejected.

Workaround

Pass an options.verify callback to pki.verifyCertificateChain() (or verify to forge.tls.createConnection()) that returns an error when any CA certificate in the chain has an extension with id 2.5.29.30. This rejects all chains below a name-constrained CA, including valid ones. Trust anchors with the extension must be checked separately.

Remediation

Upgrade node-forge to version 1.4.3 or higher.

References

high severity
new

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: ws
  • Introduced through: ws@8.21.3, parse@8.7.0 and others

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › ws@8.21.3
    Remediation: Upgrade to ws@8.23.0.
  • Introduced through: parse-server@parse-community/parse-server › parse@8.7.0 › ws@8.21.3
  • Introduced through: parse-server@parse-community/parse-server › @parse/push-adapter@8.6.0 › parse@8.7.0 › ws@8.21.3

Overview

ws is a simple to use websocket client, server and console for node.js.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the receiverOnPing handler, which generates and buffers automatic Pong responses without any bound on the number of pending responses. A malicious peer can continuously send Ping frames while pausing reads, causing the victim process to queue unbounded Pong frames until memory is exhausted and the process terminates due to an out-of-memory condition.

Workaround

In vulnerable versions, set the autoPong option to false where available, or enforce rate-limiting combined with heartbeats.

Remediation

Upgrade ws to version 5.2.8, 6.2.7, 7.5.14, 8.23.0 or higher.

References

high severity

Prototype Pollution

  • Vulnerable module: @graphql-tools/utils
  • Introduced through: @graphql-tools/utils@11.2.2, @graphql-tools/merge@9.1.7 and others

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › @graphql-tools/utils@11.2.2
    Remediation: Upgrade to @graphql-tools/utils@12.0.2.
  • Introduced through: parse-server@parse-community/parse-server › @graphql-tools/merge@9.1.7 › @graphql-tools/utils@11.2.2
    Remediation: Upgrade to @graphql-tools/merge@9.2.3.
  • Introduced through: parse-server@parse-community/parse-server › @graphql-tools/schema@10.0.31 › @graphql-tools/utils@11.2.2
    Remediation: Upgrade to @graphql-tools/schema@10.1.0.

Overview

@graphql-tools/utils is a Common package containing utils and types for GraphQL tools

Affected versions of this package are vulnerable to Prototype Pollution via mergeIncrementalResult when path segments are processed by setObjectKeyPath. An attacker can supply a path containing a non-primitive segment such as ["__proto__"], which bypasses the dangerous-key guard through type coercion and writes onto Object.prototype, corrupting the shared prototype chain for all objects in the process.

Details

Prototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as __proto__, constructor and prototype. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.

There are two main ways in which the pollution of prototypes occurs:

  • Unsafe Object recursive merge

  • Property definition by path

Unsafe Object recursive merge

The logic of a vulnerable recursive merge function follows the following high-level model:

merge (target, source)

  foreach property of source

    if property exists and is an object on both the target and the source

      merge(target[property], source[property])

    else

      target[property] = source[property]

When the source object contains a property named __proto__ defined with Object.defineProperty() , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of Object and the source of Object as defined by the attacker. Properties are then copied on the Object prototype.

Clone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: merge({},source).

lodash and Hoek are examples of libraries susceptible to recursive merge attacks.

Property definition by path

There are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: theFunction(object, path, value)

If the attacker can control the value of “path”, they can set this value to __proto__.myValue. myValue is then assigned to the prototype of the class of the object.

Types of attacks

There are a few methods by which Prototype Pollution can be manipulated:

Type Origin Short description
Denial of service (DoS) Client This is the most likely attack.
DoS occurs when Object holds generic functions that are implicitly called for various operations (for example, toString and valueOf).
The attacker pollutes Object.prototype.someattr and alters its state to an unexpected value such as Int or Object. In this case, the code fails and is likely to cause a denial of service.
For example: if an attacker pollutes Object.prototype.toString by defining it as an integer, if the codebase at any point was reliant on someobject.toString() it would fail.
Remote Code Execution Client Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.
For example: eval(someobject.someattr). In this case, if the attacker pollutes Object.prototype.someattr they are likely to be able to leverage this in order to execute code.
Property Injection Client The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.
For example: if a codebase checks privileges for someuser.isAdmin, then when the attacker pollutes Object.prototype.isAdmin and sets it to equal true, they can then achieve admin privileges.

Affected environments

The following environments are susceptible to a Prototype Pollution attack:

  • Application server

  • Web server

  • Web browser

How to prevent

  1. Freeze the prototype— use Object.freeze (Object.prototype).

  2. Require schema validation of JSON input.

  3. Avoid using unsafe recursive merge functions.

  4. Consider using objects without prototypes (for example, Object.create(null)), breaking the prototype chain and preventing pollution.

  5. As a best practice use Map instead of Object.

For more information on this vulnerability type:

Arteau, Olivier. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018

Remediation

Upgrade @graphql-tools/utils to version 12.0.2 or higher.

References

high severity

Prototype Pollution

  • Vulnerable module: @graphql-tools/utils
  • Introduced through: @graphql-tools/utils@11.2.2, @graphql-tools/merge@9.1.7 and others

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › @graphql-tools/utils@11.2.2
    Remediation: Upgrade to @graphql-tools/utils@12.0.1.
  • Introduced through: parse-server@parse-community/parse-server › @graphql-tools/merge@9.1.7 › @graphql-tools/utils@11.2.2
    Remediation: Upgrade to @graphql-tools/merge@9.2.3.
  • Introduced through: parse-server@parse-community/parse-server › @graphql-tools/schema@10.0.31 › @graphql-tools/utils@11.2.2
    Remediation: Upgrade to @graphql-tools/schema@10.1.0.

Overview

@graphql-tools/utils is a Common package containing utils and types for GraphQL tools

Affected versions of this package are vulnerable to Prototype Pollution via the mergeDeep function, which fails to block reserved property keys such as __proto__, constructor, and prototype before recursively merging source objects into an output object. An attacker who controls a source object passed to mergeDeep can pollute Object.prototype, potentially affecting all objects in the process and enabling further exploitation.

Details

Prototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as __proto__, constructor and prototype. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.

There are two main ways in which the pollution of prototypes occurs:

  • Unsafe Object recursive merge

  • Property definition by path

Unsafe Object recursive merge

The logic of a vulnerable recursive merge function follows the following high-level model:

merge (target, source)

  foreach property of source

    if property exists and is an object on both the target and the source

      merge(target[property], source[property])

    else

      target[property] = source[property]

When the source object contains a property named __proto__ defined with Object.defineProperty() , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of Object and the source of Object as defined by the attacker. Properties are then copied on the Object prototype.

Clone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: merge({},source).

lodash and Hoek are examples of libraries susceptible to recursive merge attacks.

Property definition by path

There are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: theFunction(object, path, value)

If the attacker can control the value of “path”, they can set this value to __proto__.myValue. myValue is then assigned to the prototype of the class of the object.

Types of attacks

There are a few methods by which Prototype Pollution can be manipulated:

Type Origin Short description
Denial of service (DoS) Client This is the most likely attack.
DoS occurs when Object holds generic functions that are implicitly called for various operations (for example, toString and valueOf).
The attacker pollutes Object.prototype.someattr and alters its state to an unexpected value such as Int or Object. In this case, the code fails and is likely to cause a denial of service.
For example: if an attacker pollutes Object.prototype.toString by defining it as an integer, if the codebase at any point was reliant on someobject.toString() it would fail.
Remote Code Execution Client Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.
For example: eval(someobject.someattr). In this case, if the attacker pollutes Object.prototype.someattr they are likely to be able to leverage this in order to execute code.
Property Injection Client The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.
For example: if a codebase checks privileges for someuser.isAdmin, then when the attacker pollutes Object.prototype.isAdmin and sets it to equal true, they can then achieve admin privileges.

Affected environments

The following environments are susceptible to a Prototype Pollution attack:

  • Application server

  • Web server

  • Web browser

How to prevent

  1. Freeze the prototype— use Object.freeze (Object.prototype).

  2. Require schema validation of JSON input.

  3. Avoid using unsafe recursive merge functions.

  4. Consider using objects without prototypes (for example, Object.create(null)), breaking the prototype chain and preventing pollution.

  5. As a best practice use Map instead of Object.

For more information on this vulnerability type:

Arteau, Olivier. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018

Remediation

Upgrade @graphql-tools/utils to version 12.0.1 or higher.

References

high severity

Improper Removal of Sensitive Information Before Storage or Transfer

  • Vulnerable module: follow-redirects
  • Introduced through: follow-redirects@1.16.0

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › follow-redirects@1.16.0
    Remediation: Upgrade to follow-redirects@1.16.1.

Overview

Affected versions of this package are vulnerable to Improper Removal of Sensitive Information Before Storage or Transfer via the _sanitizeOptions function in index.js when HTTP headers are supplied as a flat key/value array rather than an object. Because the array form is not converted before sensitive-header filtering is applied, headers designated as sensitive are not recognized and are not stripped on redirect, allowing an attacker in a position to observe outbound requests to capture those header values.

Remediation

Upgrade follow-redirects to version 1.16.1 or higher.

References

high severity

Insertion of Sensitive Information Into Sent Data

  • Vulnerable module: follow-redirects
  • Introduced through: follow-redirects@1.16.0

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › follow-redirects@1.16.0
    Remediation: Upgrade to follow-redirects@1.16.2.

Overview

Affected versions of this package are vulnerable to Insertion of Sensitive Information Into Sent Data via the _sanitizeOptions function in index.js, which uses instanceof Array to validate the sensitiveHeaders option. An attacker who controls the sensitiveHeaders value can supply a cross-realm array (created in a separate VM context) that passes Array.isArray but fails the instanceof Array check, causing the guard to reset sensitiveHeaders to an empty array and allowing sensitive headers to be forwarded to a redirect target that should not receive them.

PoC

Start two loopback HTTP servers. The first returns a 302 redirect to the second. Send X-API-Key and list that name in sensitiveHeaders, then compare a normal array with a genuine cross-realm array created by:

const vm = require('node:vm');
const sensitiveHeaders = vm.runInNewContext(`['X-API-Key']`);

Observed against both source and the exact npm 1.16.1 package:

  • Same-realm ['X-API-Key']: the redirect target did not receive the key.
  • Cross-realm ['X-API-Key']: Array.isArray(value) was true, value instanceof Array was false, and the redirect target received X-API-Key.
  • An unrelated X-Harmless header remained present in both cases.

The complete 3.5 KB loopback-only harness and raw JSON output are available privately.

Note: The PoC uses two loopback HTTP servers and a cross-realm array created via Node.js node:vm, tested against npm package version 1.16.1.

Remediation

Upgrade follow-redirects to version 1.16.2 or higher.

References

high severity
new

NULL Pointer Dereference

  • Vulnerable module: node-forge
  • Introduced through: @parse/push-adapter@8.6.0

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › @parse/push-adapter@8.6.0 › @parse/node-apn@8.2.0 › node-forge@1.4.2

Overview

node-forge is a JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

Affected versions of this package are vulnerable to NULL Pointer Dereference via tls.handleHandshake() in lib/tls.js, which attempts to update handshake digests via c.session.md5.update(bytes) when c.session is null. A client's session is set to null by c.reset() after a close_notify alert or a call to close(), and is also absent before handshake() is called. A malicious server or an on-path attacker can send a ServerHello record in any of these states, causing an uncaught TypeError to propagate out of connection.process() and terminate the Node.js process.

Note: Only forge.tls clients are affected; servers are not vulnerable because a server creates its session upon receiving a ClientHello.

PoC

var c = forge.tls.createConnection({server: false, ...});
    c.handshake();
    // warning close_notify alert, then an empty ServerHello, in separate
    // process() calls
    c.process(forge.util.hexToBytes('15030100020100'));
    c.process(forge.util.hexToBytes('160301000402000000'));
    // <= 1.4.2: TypeError: Cannot read properties of null (reading 'md5')
    // 1.4.3: the record is ignored

The reporter's PoC is in tests/pocs/ghsa-j8rw-jp99-435v.js, and regression tests are in tests/unit/tls.js.

Remediation

Upgrade node-forge to version 1.4.3 or higher.

References

high severity
new

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: node-forge
  • Introduced through: @parse/push-adapter@8.6.0

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › @parse/push-adapter@8.6.0 › @parse/node-apn@8.2.0 › node-forge@1.4.2

Overview

node-forge is a JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via _trimString() in lib/http.js, which removes trailing whitespace using the regular expression /\s*$/. On a string of n whitespace characters followed by a non-whitespace character, the engine attempts a match at each position and scans the remainder of the run each time, producing O(n^2) work. forge.http calls _trimString() on every response header value processed by response.readHeader() and on cookie names and values in response.getCookies(), with no limit on header size. A server or on-path attacker can send a large response header that blocks the client's event loop for minutes, denying service to everything else in the process.

Note: This is only exploitable by applications that use forge.http directly; forge.http is not loaded by require('node-forge') and requires a socket pool provided by the application.

Workaround

Limit the size of HTTP response headers before passing them to forge.http, for example in the socket pool's data handler.

PoC

var response = forge.http.createResponse();
    var ws = new Array(40001).join('\t ');
    response.readHeader(forge.util.createBuffer(
      'HTTP/1.1 200 OK\r\nX-A: a' + ws + 'X\r\n\r\n'));
    // <= 1.4.2: about 4 seconds (quadratic in the whitespace length)
    // 1.4.3: about 1 ms

Regression tests are in tests/security/ghsa-6cv4-p8m7-4r25.js.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.

The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.

Let’s take the following regular expression as an example:

regex = /A(B|C+)+D/

This regular expression accomplishes the following:

  • A The string must start with the letter 'A'
  • (B|C+)+ The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the + matches one or more times). The + at the end of this section states that we can look for one or more matches of this section.
  • D Finally, we ensure this section of the string ends with a 'D'

The expression would match inputs such as ABBD, ABCCCCD, ABCBCCCD and ACCCCCD

It most cases, it doesn't take very long for a regex engine to find a match:

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
0.04s user 0.01s system 95% cpu 0.052 total

$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
1.79s user 0.02s system 99% cpu 1.812 total

The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.

Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as catastrophic backtracking.

Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:

  1. CCC
  2. CC+C
  3. C+CC
  4. C+C+C.

The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use RegEx 101 debugger to see the engine has to take a total of 38 steps before it can determine the string doesn't match.

From there, the number of steps the engine must use to validate a string just continues to grow.

String Number of C's Number of steps
ACCCX 3 38
ACCCCX 4 71
ACCCCCX 5 136
ACCCCCCCCCCCCCCX 14 65,553

By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.

Remediation

Upgrade node-forge to version 1.4.3 or higher.

References

high severity
new

Uncaught Exception

  • Vulnerable module: node-forge
  • Introduced through: @parse/push-adapter@8.6.0

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › @parse/push-adapter@8.6.0 › @parse/node-apn@8.2.0 › node-forge@1.4.2

Overview

node-forge is a JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

Affected versions of this package are vulnerable to Uncaught Exception via tls.parseHelloMessage() in lib/tls.js, which stores the ServerHello's compression_method without validating it against the methods offered in the ClientHello. When the client subsequently handles ServerHelloDone, tls.createConnectionState() throws an uncaught Error('Unsupported compression algorithm.') for any compression method other than null (0) or deflate (1). Because the ServerHello is not yet authenticated at this point, a malicious server or an on-path attacker can set the compression byte to an unsupported value, causing connection.process() to throw and terminating the Node.js process in applications that do not catch the exception - including those using forge.tls.wrapSocket or forge.http.

Workaround

Catch exceptions thrown by connection.process() and close the socket.

PoC

A server (or on-path attacker) sends a ServerHello with `compression_method` 0xff, followed by a valid Certificate and ServerHelloDone:

    client.handshake();
    client.process(serverHello + certificate + serverHelloDone);
    // <= 1.4.2: throws Error: Unsupported compression algorithm.
    // 1.4.3: error callback with "Unsupported compression method."

The reporter's PoC (a CA-issued server certificate and the default verify callback) is in tests/pocs/ghsa-w4xr-hqv8-ch44.js, and regression tests are in tests/unit/tls.js.

Remediation

Upgrade node-forge to version 1.4.3 or higher.

References

medium severity

Incorrect Regular Expression

  • Vulnerable module: follow-redirects
  • Introduced through: follow-redirects@1.16.0

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › follow-redirects@1.16.0
    Remediation: Upgrade to follow-redirects@1.16.1.

Overview

Affected versions of this package are vulnerable to Incorrect Regular Expression in the escapeRegex function in index.js, which escapes ], \, /, (, ), *, +, ?, ., and $ but leaves ^, |, [, {, and } intact, and whose output is joined into the alternation that the RedirectableRequest constructor compiles into this._headerFilter. An attacker can receive a custom credential header that the application declared through sensitiveHeaders by drawing the request into a cross-origin redirect to a host they control, because a declared name holding ^, such as X-Api^Key, gains a mid-pattern start-of-string anchor and can never match, while one holding |, such as X-Token|Secret, splits into the separate alternatives X-Token and Secret, so the real header is forwarded and unrelated headers by those names are stripped instead. Only ^ and | are reachable in practice, since Node rejects [, {, and } in header names with ERR_INVALID_HTTP_TOKEN and declaring one of them instead throws a SyntaxError from the constructor, and the built-in Authorization, Proxy-Authorization, and Cookie entries contain no metacharacters, so the failure is confined to applications that declare their own names and silently lose the protection they configured.

Remediation

Upgrade follow-redirects to version 1.16.1 or higher.

References

medium severity
new

Improper Enforcement of Behavioral Workflow

  • Vulnerable module: express-rate-limit
  • Introduced through: express-rate-limit@8.7.0

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › express-rate-limit@8.7.0
    Remediation: Upgrade to express-rate-limit@8.7.2.

Overview

express-rate-limit is a Basic IP rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.

Affected versions of this package are vulnerable to Improper Enforcement of Behavioral Workflow via MemoryStore.resetClient mutating the shared resetTime Date object in place when skipFailedRequests or skipSuccessfulRequests is enabled. MemoryStore.increment returns the stored Client object directly, so the middleware's resetTime reference and the store's client.resetTime point to the same Date. When a subsequent request triggers resetClient, it calls client.resetTime.setTime(now + windowMs), advancing that shared Date forward. An earlier request still in flight then finishes or disconnects after the window boundary, reads the now-updated reset time, passes the stale-window guard at rate-limit.ts:545-547, and decrements the new window's hit count. A client that keeps requests in flight across a window boundary can thereby obtain up to one additional configured limit worth of requests in the new window as a one-off burst.

Note: This is only exploitable when the default MemoryStore is used together with the skipFailedRequests or skipSuccessfulRequests option.

Remediation

Upgrade express-rate-limit to version 8.7.2 or higher.

References

medium severity
new

Improper Neutralization of Null Byte or NUL Character

  • Vulnerable module: mongodb
  • Introduced through: mongodb@7.1.0

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › mongodb@7.1.0
    Remediation: Upgrade to mongodb@7.9.1.

Overview

mongodb is an official MongoDB driver for Node.js.

Affected versions of this package are vulnerable to Improper Neutralization of Null Byte or NUL Character in the plain.js PLAIN authentication provider, which builds the SASL PLAIN message by joining the username and password with NUL separators without rejecting NUL characters inside either field. A user with valid credentials for one identity can authenticate as that identity instead of the one the application constructed, bypassing application-side identity checks such as an allow list or a required username suffix, by supplying a username containing NUL-separated authentication and password values. This affects only applications that use authMechanism: 'PLAIN' and build the username or password from less trusted input.

Workaround

This vulnerability can be avoided by rejecting any username or password that contains a NUL character (\0, or %00 in a connection string) before passing it to MongoClient.

Remediation

Upgrade mongodb to version 7.9.1 or higher.

References

medium severity
new

Improper Verification of Cryptographic Signature

  • Vulnerable module: node-forge
  • Introduced through: @parse/push-adapter@8.6.0

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › @parse/push-adapter@8.6.0 › @parse/node-apn@8.2.0 › node-forge@1.4.2

Overview

node-forge is a JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

Affected versions of this package are vulnerable to Improper Verification of Cryptographic Signature via ed25519.verify() in lib/ed25519.js, which does not reject public keys of small order. crypto_sign_open() decodes the public key A with unpackneg(), which only checks that the point is on the curve, and never validates that the key is not a small-order point (the identity point or the other 7 points of order 2, 4, or 8, including non-canonical encodings with y >= p). An attacker who can supply the public key can present a small-order key together with a signature where S = 0 and a small-order R, causing the verification equation R == [k](-A) to hold for many or all messages without knowledge of any private key. For the identity key specifically, the fixed signature R = identity, S = 0 verifies for every message.

PoC

Identity public key `A = 01 00 … 00` (32 bytes) and signature `R = 01 00 … 00`, `S = 00 … 00` (64 bytes):

    forge.ed25519.verify({message: 'admin=true', encoding: 'utf8',
      signature: SIG, publicKey: IDENTITY});
    // <= 1.4.2: true for any message; node:crypto.verify(): false
    // 1.4.3: false

Other small-order public keys (orders 2, 4 and 8, and non-canonical encodings) give forgeries for many messages with `S = 0` and a small-order `R`.

Regression tests are in tests/unit/ed25519.js, and the reporter's PoC is in tests/pocs/ghsa-6889-vf6x-f3g5.js.

Remediation

Upgrade node-forge to version 1.4.3 or higher.

References

medium severity
new

Missing Cryptographic Step

  • Vulnerable module: node-forge
  • Introduced through: @parse/push-adapter@8.6.0

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › @parse/push-adapter@8.6.0 › @parse/node-apn@8.2.0 › node-forge@1.4.2

Overview

node-forge is a JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

Affected versions of this package are vulnerable to Missing Cryptographic Step via pki.privateKeyFromPem() and pki.privateKeyFromAsn1() in lib/rsa.js, which ignore the RSAPrivateKey version field and the otherPrimeInfos field, causing a multi-prime RSA private key (RFC 8017 A.1.2, version 1) to be silently loaded as a two-prime key. Signing with the resulting key uses CRT values for only the first two primes, producing an invalid signature from which any observer can compute gcd(s^e - EM, n) to recover a factor of the modulus, reducing the effective security of a 2048-bit three-prime key to approximately that of a 1366-bit RSA key.

Note: This is only exploitable when a multi-prime RSA private key (generated with, for example, openssl genpkey -pkeyopt rsa_keygen_primes:3) is loaded and used for signing. Two-prime keys, which are the default output of OpenSSL, Node.js, and most other tools, are not affected.

Workaround

Avoid loading multi-prime RSA private keys with node-forge. Before loading a key from an untrusted or unknown source, verify that its RSAPrivateKey version field is 0. Any multi-prime key that was already used to sign with node-forge should be replaced, as its signatures have revealed a factor of the modulus.

Remediation

Upgrade node-forge to version 1.4.4 or higher.

References

medium severity
new

Improper Neutralization of Null Byte or NUL Character

  • Vulnerable module: pg-protocol
  • Introduced through: pg-promise@12.6.0

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › pg-promise@12.6.0 › pg@8.18.0 › pg-protocol@1.16.1

Overview

pg-protocol is a The postgres client/server binary protocol, implemented in TypeScript

Affected versions of this package are vulnerable to Improper Neutralization of Null Byte or NUL Character in the startup function of the StartupMessage serializer. An attacker who can influence a connection parameter value, such as database, application_name, or options, can embed a NUL byte in it to split the parameter's value early, shifting the parsing of every subsequent key and value pair and effectively injecting an attacker-chosen server parameter such as search_path. This requires the calling application to pass that attacker-influenced value into a connection parameter without stripping NUL bytes first, a pattern seen in multi-tenant setups that select the database per request or set application_name from user-supplied data.

Remediation

There is no fixed version for pg-protocol.

References

medium severity
new

Improper Restriction of Communication Channel to Intended Endpoints

  • Vulnerable module: mongodb
  • Introduced through: mongodb@7.1.0

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › mongodb@7.1.0
    Remediation: Upgrade to mongodb@7.9.0.

Overview

mongodb is an official MongoDB driver for Node.js.

Affected versions of this package are vulnerable to Improper Restriction of Communication Channel to Intended Endpoints via OIDC ENVIRONMENT and callback confusion in MongoCredentials validation, where specifying both an ENVIRONMENT value and an OIDC_CALLBACK or OIDC_HUMAN_CALLBACK bypasses the ALLOWED_HOSTS restriction. A bearer token produced by the application's own login callback can therefore be transmitted to a host outside the configured set of permitted hosts, resulting in unintended disclosure of that credential.

Remediation

Upgrade mongodb to version 7.9.0 or higher.

References

medium severity
new

Information Exposure

  • Vulnerable module: mongodb
  • Introduced through: mongodb@7.1.0

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › mongodb@7.1.0
    Remediation: Upgrade to mongodb@7.9.1.

Overview

mongodb is an official MongoDB driver for Node.js.

Affected versions of this package are vulnerable to Information Exposure in the HostAddress class in utils.ts and the parseOptions function in connection_string.ts, which include connection-string components in the messages and cause of errors thrown during MongoClient construction and connection. An attacker with access to the application's logs can obtain database credentials when the application passes a connection string with credentials but no valid host, because the user:pass portion is parsed as host:port and appears in the resulting Unable to parse ... with URL error and its cause.input. This affects only applications that build connection strings from user or configuration input where a missing or malformed host can reach the driver, and that log driver errors or MongoClient instances.

Workaround

This vulnerability can be avoided by validating that connection strings contain a host before passing them to the driver, and by redacting the message and cause of errors raised during MongoClient construction or connection before logging them.

Remediation

Upgrade mongodb to version 7.9.1 or higher.

References

medium severity

MPL-2.0 license

  • Module: web-push
  • Introduced through: @parse/push-adapter@8.6.0

Detailed paths

  • Introduced through: parse-server@parse-community/parse-server › @parse/push-adapter@8.6.0 › web-push@3.6.7

MPL-2.0 license