Vulnerabilities

29 via 33 paths

Dependencies

362

Source

GitHub

Find, fix and prevent vulnerabilities in your code.

Issue type
  • 29
  • 1
Severity
  • 2
  • 17
  • 10
  • 1
Status
  • 30
  • 0
  • 0

critical severity
new

Improper Certificate Validation

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0
    Remediation: Upgrade to parse-server@9.11.0.

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 in the pki.verifyCertificateChain function in lib/x509.js. An attacker can get a non-CA certificate accepted as a CA, and then impersonate any server or client the verifier trusts, by placing a second basicConstraints extension under the deprecated OIDs 2.5.29.10 or 2.5.29.13 with cA set TRUE, because lib/oids.js maps those OIDs to the same name and cert.getExtension() returns the first name match, so chain verification reads the forged extension in place of the genuine 2.5.29.19 one. This requires a CA that the application trusts to issue a certificate carrying the attacker-supplied deprecated-OID extension, as when a CA copies extensions from certificate requests through an OpenSSL copy_extensions workflow, and node-forge still rejects the chain if that issuer adds a keyUsage extension without keyCertSign.

Workaround

This vulnerability can be avoided with an options.verify callback that rejects any non-leaf certificate lacking a 2.5.29.19 basicConstraints extension with cA TRUE, and, on the issuance side, by configuring trusted CAs not to copy unrecognized extensions from certificate requests.

Note: This is a bypass of the fix for the vulnerability described in CVE-2026-33896.

Remediation

Upgrade node-forge to version 1.4.1 or higher.

References

critical severity
new

Improper Certificate Validation

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0

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

Improper Validation of Specified Quantity in Input

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0
    Remediation: Upgrade to parse-server@9.11.0.

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 Validation of Specified Quantity in Input in the pkcs12.pkcs12FromAsn1 function in lib/pkcs12.js and the pki.pbe.generatePkcs12Key key derivation in lib/pbe.js. An attacker can alter a PFX file, substitute certificates or an unencrypted private key, and compute a MAC that verifies under any password, by setting MacData.iterations to zero or less, because the PKCS#12 key derivation then runs its hash loop zero times and returns a constant that does not depend on the password or salt (the MAC key becomes the diversifier byte 0x03 repeated 20 times, and PBE derives constant key and IV bytes 0x01 and 0x02). This affects applications that import PKCS#12/PFX files or PKCS#8 encrypted keys from untrusted sources and rely on the MAC or on successful decryption to establish provenance, while PBES2 (PBKDF2) encrypted content is unaffected.

Remediation

Upgrade node-forge to version 1.4.1 or higher.

References

high severity

Improper Verification of Cryptographic Signature

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0
    Remediation: Upgrade to parse-server@9.11.0.

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 in rsa.js, whose DigestInfo validation checks the outer element count (obj.value.length !== 2) but never verifies the element count of the inner DigestAlgorithm SEQUENCE, so the ASN.1 parser accepts extra children that are ignored during digest extraction. An attacker can forge a signature that verifies as valid for an arbitrary message, without the private key, by fixing the target digest at the block boundaries and filling roughly 314 garbage bytes inside the DigestAlgorithm structure to absorb the mathematical residue. This only affects verification against RSA keys with a low public exponent such as e=3, and although _parseAllDigestBytes defaults to true and rejects trailing garbage, it does not detect this interior padding.

Note: This is a bypass of the fix for the vulnerability described in CVE-2026-33894 and, as of this publication, has not been acknowledged by project maintainers.

Remediation

Upgrade node-forge to version 1.4.1 or higher.

References

high severity
new

Improper Verification of Cryptographic Signature

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0
    Remediation: Upgrade to parse-server@9.11.0.

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 in the key.verify() method in lib/rsa.js, which X.509 certificate and PKCS#7 verification also use. An attacker can make verification of an RSA PKCS#1 v1.5 signature succeed for an arbitrary message without the private key by adding extra elements to the nested DigestAlgorithm SEQUENCE of the DigestInfo, which the parser does not reject. Only verification with an RSA public key that has a low exponent such as e=3 is practically exploitable.

Workaround

This vulnerability can be avoided by not using RSA keys with a low public exponent (e=3) for signature verification.

Note: This is a bypass of the fix for the vulnerability described in CVE-2026-33894.

Remediation

Upgrade node-forge to version 1.4.1 or higher.

References

high severity
new

NULL Pointer Dereference

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0
    Remediation: Upgrade to parse-server@9.11.0.

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 in the _readRecord function in lib/tls.js. An attacker can terminate the peer's Node.js process by sending a handshake message fragmented across records and then interleaving a record of another content type such as an alert, change_cipher_spec, application_data, or heartbeat, because the resulting fatal error sets c.record to null while _readRecord() continues and assigns c.record.ready = true, throwing an uncaught TypeError out of process(). This affects any forge.tls connection in server or client mode, including those from wrapSocket, forge.http, and forge.xhr, and the crash lands when process() is driven from a Node.js socket data handler as in the documented usage.

Remediation

Upgrade node-forge to version 1.4.1 or higher.

References

high severity
new

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0
    Remediation: Upgrade to parse-server@9.11.0.

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) in the pem.decode function in lib/pem.js. A remote attacker can block the Node.js event loop for seconds to minutes with an input of a few tens of kilobytes, because the message regex takes polynomial time on PEM text that contains no matching END line. This requires the application to pass untrusted PEM to a parsing entry point such as pki.certificateFromPem(), pki.privateKeyFromPem(), or pkcs7.messageFromPem(), as in a service that accepts uploaded certificates, keys, CSRs, or SAML metadata.

Workaround

This vulnerability can be avoided by rejecting untrusted PEM input above a few kilobytes before passing it to the parser, which shortens but does not eliminate the delay (on 1.4.0, roughly 7 KB blocks for 0.4 s and 29 KB for 24 s).

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.1 or higher.

References

high severity
new

Uncontrolled Recursion

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0
    Remediation: Upgrade to parse-server@9.11.0.

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 Uncontrolled Recursion in the TLS record processing in lib/tls.js, where connection.process() and the per-record-type handlers it dispatches through ctTable (tls.handleHeartbeat, tls.handleApplicationData, tls.handleHandshake, tls.handleHelloRequest) re-enter process() for each record. An attacker can exhaust the call stack and terminate the peer's Node.js process by sending many small TLS records in a single chunk, roughly 2,300 eight-byte records in under 20 KB on Node.js 24, since each record adds a stack frame rather than being handled in a loop. This affects any forge.tls connection in server or client mode, including those from wrapSocket, forge.http, and forge.xhr, needs no handshake because heartbeat records are processed first, and in a browser is confined to the attacked connection while a Node.js process crash drops every connection it serves.

Remediation

Upgrade node-forge to version 1.4.1 or higher.

References

high severity
new

Uncontrolled Recursion

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0
    Remediation: Upgrade to parse-server@9.11.0.

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 Uncontrolled Recursion in the asn1.fromDer function in lib/asn1.js. An attacker can drive CPU and memory high enough to abort the Node.js process with a small DER or PEM structure containing nested BIT STRINGs, because the default BIT STRING decode path in _fromDer() starts with an options object that omits maxDepth, so the depth check compares against undefined and never fires, and each nested BIT STRING's contents are deep-copied by asn1.create(), making memory grow quadratically with nesting depth. This triggers under default options through any API that parses DER or PEM, including pki.certificateFromPem(), pki.publicKeyFromPem(), the PKCS#7, PKCS#8, and PKCS#12 loaders, and server certificates received by the forge TLS client.

Workaround

This vulnerability can be avoided by direct callers of forge.asn1.fromDer() passing {decodeBitStrings: false}, which stops the nested decode but changes the parsed structure, so it does not help the higher-level PKI, PKCS, and TLS APIs that do not expose the option.

Note: This is a bypass of the fix for the vulnerability described in CVE-2025-66031.

Remediation

Upgrade node-forge to version 1.4.1 or higher.

References

high severity
new

Prototype Pollution

  • Vulnerable module: @graphql-tools/utils
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @graphql-tools/utils@11.2.2
  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @graphql-tools/merge@9.1.7 › @graphql-tools/utils@11.2.2
  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @graphql-tools/schema@10.0.31 › @graphql-tools/utils@11.2.2

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: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @graphql-tools/utils@11.2.2
  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @graphql-tools/merge@9.1.7 › @graphql-tools/utils@11.2.2
  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @graphql-tools/schema@10.0.31 › @graphql-tools/utils@11.2.2

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
new

Improper Removal of Sensitive Information Before Storage or Transfer

  • Vulnerable module: follow-redirects
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › follow-redirects@1.16.0

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
new

Insertion of Sensitive Information Into Sent Data

  • Vulnerable module: follow-redirects
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › follow-redirects@1.16.0

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

Improper Certificate Validation

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0
    Remediation: Upgrade to parse-server@9.11.0.

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 in the pki.verifyCertificateChain function in lib/x509.js. An attacker who controls a CA certificate that carries a pathLenConstraint but no keyUsage extension can place more intermediate CAs below it than the constraint permits and have the chain accepted, because the path-length check is guarded by keyUsageExt !== null && 'pathLenConstraint' in bcExt and is skipped whenever keyUsage is absent. This requires a trusted chain that contains such a constrained CA without keyUsage, which mainly arises in private PKIs since public web PKI CAs include keyUsage, and the attacker must hold that CA's key or obtain a CA certificate from it to issue the extra subordinates.

Workaround

This vulnerability can be avoided with an options.verify callback that rejects any chain where a CA at depth d has a pathLenConstraint less than d minus 1, or, on the issuance side, by re-issuing constrained CA certificates with a keyUsage extension that includes keyCertSign, which restores enforcement.

Remediation

Upgrade node-forge to version 1.4.1 or higher.

References

high severity
new

Improper Validation of Specified Quantity in Input

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0
    Remediation: Upgrade to parse-server@9.11.0.

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 Validation of Specified Quantity in Input in the modes.gcm.prototype.start method in lib/cipherModes.js. An attacker can have forged ciphertext accepted as authentic, and alter known plaintext to chosen values, by supplying an empty authentication tag, because a zero-like tagLength is stored without validation and afterFinish() computes truncate(16 % (tagLength / 8)), which for a zero value evaluates to 16 % 0 = NaN and empties the tag, so decipher.finish() compares two empty strings and returns true. This is reached only when the application calls forge.cipher.createDecipher('AES-GCM', ...) with a zero-like tagLength, such as one derived from the received tag length or an unset configuration value, while the default 128-bit tag and any fixed valid tagLength are unaffected.

Remediation

Upgrade node-forge to version 1.4.1 or higher.

References

high severity
new

NULL Pointer Dereference

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0
    Remediation: Upgrade to parse-server@9.11.0.

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 in the tls.handleServerHelloDone function in lib/tls.js. A malicious TLS server, or an on-path attacker who strips the server's Certificate message, can terminate the client's Node.js process by completing a handshake with no certificate, because the missing-certificate guard tests the unused c.serverCertificate property while tls.createClientKeyExchange reads c.session.serverCertificate.publicKey and throws an uncaught TypeError. This affects only applications that use the forge TLS client (forge.tls.createConnection with server: false) and drive it from a socket data handler, and the exception leaves connection.process() without invoking the verify or error callbacks.

Remediation

Upgrade node-forge to version 1.4.1 or higher.

References

high severity
new

NULL Pointer Dereference

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0

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-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0

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-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0

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
new

Incorrect Regular Expression

  • Vulnerable module: follow-redirects
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › follow-redirects@1.16.0

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: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › express-rate-limit@8.7.0

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 Validation of Specified Quantity in Input

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0
    Remediation: Upgrade to parse-server@9.11.0.

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 Validation of Specified Quantity in Input in the modes.cbc.prototype.unpad and modes.ecb.prototype.unpad methods in lib/cipherModes.js. An attacker can have malformed ciphertext accepted as valid and silently strip up to four blocks of trailing plaintext, by manipulating the final bytes of malleable CBC or ECB ciphertext, because the unpadding reads only the last byte as the padding count, rejects it only when it exceeds four blocks, and never verifies that the remaining padding bytes equal that count. This matters only when the application relies on decipher.finish() to decide whether decrypted data is valid, and the added capability is small because unauthenticated CBC and ECB ciphertext is already malleable.

Workaround

This vulnerability can be avoided by authenticating CBC or ECB ciphertext with an HMAC before decrypting, or using an authenticated mode such as AES-GCM, which removes the reliance on padding validity to detect tampering.

Remediation

Upgrade node-forge to version 1.4.1 or higher.

References

medium severity
new

Improper Verification of Cryptographic Signature

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0
    Remediation: Upgrade to parse-server@9.11.0.

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 in the certificate.verify method in lib/x509.js. An attacker can relabel an existing PKCS#1 v1.5 certificate as RSASSA-PSS and still have it pass chain verification, by altering the unsigned outer signatureAlgorithm field, because _verifySignature() selects the padding scheme from the issuer certificate's signatureOid and signatureParameters rather than from the scheme the child certificate declares. The signature must still come from the issuer's key, so no forgery is possible, and this only matters to applications that make decisions based on a certificate's declared signature algorithm, such as a policy that accepts only RSASSA-PSS.

Remediation

Upgrade node-forge to version 1.4.1 or higher.

References

medium severity
new

Improper Verification of Cryptographic Signature

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0

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

Integer Overflow or Wraparound

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0
    Remediation: Upgrade to parse-server@9.11.0.

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 Integer Overflow or Wraparound in the asn1.oidToDer function in lib/asn1.js. An attacker can make the encoder emit DER for a different, trusted OID than the string the application validated, by supplying an OID whose first two arcs are out of range, because oidToDer computes 40 * arc1 + arc2 and writes the result with putByte(), which keeps only the low 16 bits, so 0.42.840.113549.1.1.1 encodes to the DER for 1.2.840.113549.1.1.1 (rsaEncryption). This affects only applications that accept untrusted OID strings, validate them as strings, and then encode them with node-forge into structures such as certificates or CSRs, while decoding DER is unaffected.

Note: This is a bypass of the fix for the vulnerability described in CVE-2025-66030.

Remediation

Upgrade node-forge to version 1.4.1 or higher.

References

medium severity
new

Modification of Assumed-Immutable Data (MAID)

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0
    Remediation: Upgrade to parse-server@9.11.0.

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 Modification of Assumed-Immutable Data (MAID) in the pki.verifyCertificateChain function in lib/x509.js. An attacker can permanently disable verification against an affected trusted CA by presenting a certificate whose issuer name matches a subject shared by two or more CAs in the store, because the function calls parents.shift() on the live array returned by caStore.getIssuer() (the store's internal caStore.certs[hash]), removing every candidate CA it examines, including the one that ultimately verifies the chain. Exploitation requires a long-lived CA store that holds two or more certificates with the same subject name and is reused across verifications, such as a forge.tls client sharing one caStore object across connections, a condition that mostly arises in private PKIs with re-keyed or renewed CAs that kept their name. The failure mode is availability only: subsequent valid chains under the drained CA are rejected, verification against other trusted CAs continues to work, and no invalid chain is ever accepted.

Workaround

This vulnerability can be avoided by using a fresh CA store for each verifyCertificateChain() call, or by passing the trusted certificates to forge.tls.createConnection() as an array rather than sharing a single long-lived caStore object across connections.

Remediation

Upgrade node-forge to version 1.4.1 or higher.

References

medium severity
new

Prototype Pollution

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0
    Remediation: Upgrade to parse-server@9.11.0.

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 Prototype Pollution in the client.setCookie function in lib/http.js. A malicious server can add or delete Object.prototype and Object properties across the entire JavaScript realm by returning a Set-Cookie header named __proto__ or constructor, because the forge.http cookie store keys a plain object by cookie name and path and tests membership with the in operator, and an empty cookie value routes to client.removeCookie to delete inherited properties. This is reached only when the application uses forge.http, or forge.xhr through the forge.all browser bundle, which require('node-forge') does not load, and the empty-value deletion path skips the secure-flag and domain checks, so it also works for plain http:// clients.

Workaround

This vulnerability can be avoided by stripping Set-Cookie response headers whose cookie name or path is __proto__, constructor, or another Object.prototype property name before they reach the client, for example at a reverse proxy.

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 node-forge to version 1.4.1 or higher.

References

medium severity
new

Improper Restriction of Communication Channel to Intended Endpoints

  • Vulnerable module: mongodb
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › mongodb@7.1.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

MPL-2.0 license

  • Module: web-push
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › web-push@3.6.7

MPL-2.0 license

low severity
new

Infinite loop

  • Vulnerable module: node-forge
  • Introduced through: parse-server@9.10.7

Detailed paths

  • Introduced through: parse-server-example@parse-community/parse-server-example › parse-server@9.10.7 › @parse/push-adapter@8.5.5 › @parse/node-apn@8.1.0 › node-forge@1.4.0
    Remediation: Upgrade to parse-server@9.11.0.

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 Infinite loop in the BigInteger.prototype.modInverse method in the bundled jsbn library (lib/jsbn.js). An attacker can spin the calling thread at 100% CPU and block the Node.js event loop by supplying a negative operand or negative modulus to modInverse, whose binary extended Euclidean algorithm is defined only for positive integers and so never reaches its loop exit condition. This is reachable only when an application passes an untrusted RSA public exponent to forge.pki.rsa.generateKeyPair(), createKeyPairGenerationState(), or stepKeyPairGenerationState() (any exponent other than 3 or 65537 takes the pure-JavaScript path), or calls modInverse() directly on negative values derived from untrusted input, while data parsed by node-forge such as DER, PEM, JWK, PKCS#12, X.509, and TLS is read as unsigned and cannot trigger it.

Note: This is a bypass of the fix for the vulnerability described in CVE-2026-33891.

Remediation

Upgrade node-forge to version 1.4.1 or higher.

References