Vulnerabilities |
49 via 82 paths |
|---|---|
Dependencies |
439 |
Source |
GitHub |
Find, fix and prevent vulnerabilities in your code.
critical severity
- Vulnerable module: undici
- Introduced through: @digitalbazaar/vc@7.1.2
Detailed paths
-
Introduced through: web@gotois/secretary-web › @digitalbazaar/vc@7.1.2 › jsonld@8.3.3 › @digitalbazaar/http-client@3.4.1 › undici@5.29.0Remediation: Upgrade to @digitalbazaar/vc@7.3.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
- Vulnerable module: undici
- Introduced through: @digitalbazaar/vc@7.1.2
Detailed paths
-
Introduced through: web@gotois/secretary-web › @digitalbazaar/vc@7.1.2 › jsonld@8.3.3 › @digitalbazaar/http-client@3.4.1 › undici@5.29.0Remediation: Upgrade to @digitalbazaar/vc@7.3.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 Certificate Validation via the Agent constructor in lib/dispatcher/agent.js, where TLS options passed as the tls parameter are silently dropped and never stored in kOptions. Because the tls field is not destructured and forwarded to the internal options object, any TLS configuration supplied by the caller - including custom CA certificates, certificate pinning, or hostname verification overrides - is ignored when connections are established. An attacker positioned on the network can exploit the resulting absence of TLS constraints to perform a MitM attack, intercepting or modifying HTTPS traffic that the caller believed was protected by the supplied TLS settings.
Workaround
Users who are not able to upgrade to the fixed version are advised to pass the TLS options through connect instead of tls. For proxied EnvHttpProxyAgent destinations, use requestTls / proxyTls.
Remediation
Upgrade undici to version 6.29.1, 7.30.1, 8.12.2 or higher.
References
high severity
- Vulnerable module: @modelcontextprotocol/sdk
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › @modelcontextprotocol/sdk@1.29.0
Overview
@modelcontextprotocol/sdk is a Model Context Protocol implementation for TypeScript
Affected versions of this package are vulnerable to Missing Authorization via the InMemoryTaskStore implementation, where tasks created within one session are accessible to requests from other sessions. An attacker with access to a shared MCP server can read, modify, or retrieve results of tasks belonging to other users by supplying a known or guessed task ID, bypassing session-level isolation.
Note: This is only exploitable if the HTTP server passes taskStore to McpServer or Server.
Remediation
Upgrade @modelcontextprotocol/sdk to version 1.32.0 or higher.
References
high severity
- Vulnerable module: @modelcontextprotocol/sdk
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › @modelcontextprotocol/sdk@1.29.0
Overview
@modelcontextprotocol/sdk is a Model Context Protocol implementation for TypeScript
Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the tools/call request handler in mcp.ts, where an attacker can send a tools/call request with a deeply nested or arbitrarily large arguments payload, causing unbounded recursive traversal of the input structure and exhausting server resources. The server performs no limit on the number of array elements or object members processed from tool-call arguments, allowing a remote attacker to crash the server process through resource exhaustion.
Remediation
Upgrade @modelcontextprotocol/sdk to version 1.32.0 or higher.
References
high severity
- Vulnerable module: @modelcontextprotocol/sdk
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › @modelcontextprotocol/sdk@1.29.0
Overview
@modelcontextprotocol/sdk is a Model Context Protocol implementation for TypeScript
Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via unbounded HTTP request body reading in the Hono middleware handler. An unauthenticated attacker can send an arbitrarily large JSON request body or an unbounded JSON-RPC batch, causing the server to consume excessive memory and crash.
Remediation
Upgrade @modelcontextprotocol/sdk to version 1.30.1 or higher.
References
high severity
- Vulnerable module: @modelcontextprotocol/sdk
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › @modelcontextprotocol/sdk@1.29.0
Overview
@modelcontextprotocol/sdk is a Model Context Protocol implementation for TypeScript
Affected versions of this package are vulnerable to Insufficiently Protected Credentials via the fetchToken and discardIfIssuerMismatch functions in the OAuth client authentication flow, where the SEP-2352 issuer check is not applied consistently. An attacker controlling a malicious authorization server can cause the client to send OAuth client credentials (client information) to an unintended server, because the issuer stamp on stored credentials is not validated before the token request is dispatched. This allows an attacker to harvest client credentials by redirecting token requests to a server whose issuer does not match the one the credentials were originally registered with.
Remediation
Upgrade @modelcontextprotocol/sdk to version 1.31.0 or higher.
References
high severity
new
- Vulnerable module: domutils
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › cheerio-select@2.1.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › htmlparser2@10.1.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › cheerio-select@2.1.0 › css-select@5.2.2 › domutils@3.2.2
Overview
Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via getFeed() in src/feeds.ts, when parsing RSS or Atom feeds containing nested item or entry elements. Because getFeed() collected item and entry elements at any depth below the feed root, an item nested inside another item was treated as an independent item, and its media elements were collected again for every enclosing item. This causes N nested items around M media:content elements to produce N × M media objects, exhausting the Node.js heap and terminating the process in a way that try/catch cannot prevent.
PoC
import { parseDocument } from "htmlparser2";
import { getFeed } from "domutils";
const n = 400;
const xml = "<rss><channel>" + "<item>".repeat(n) +
'<media:content url="x"/>'.repeat(n) + "</item>".repeat(n) +
"</channel></rss>";
const feed = getFeed(parseDocument(xml, { xmlMode: true }).children);
console.log(feed.items.reduce((sum, item) => sum + item.media.length, 0));
// 160000 with domutils 4.0.2 (15 KB of input)
Remediation
Upgrade domutils to version 4.1.0 or higher.
References
high severity
new
- Vulnerable module: domutils
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › cheerio-select@2.1.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › htmlparser2@10.1.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › cheerio-select@2.1.0 › css-select@5.2.2 › domutils@3.2.2
Overview
Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity via an inefficient algorithm in removeSubsets() that exhibits O(n² × depth) time complexity. When processing documents with many nested or sibling nodes, an attacker can submit HTML or XML input processed by css-select selectAll() or cheerio .find() to exhaust CPU and block the Node.js event loop for seconds.
PoC
import { parseDocument } from "htmlparser2";
import { getElementsByTagName, removeSubsets } from "domutils";
const doc = parseDocument("<b>".repeat(5_000) + "<i></i>".repeat(5_000));
const nodes = getElementsByTagName("i", doc);
console.time("removeSubsets");
removeSubsets(nodes); // about 15 s with domutils 4.0.2
console.timeEnd("removeSubsets");
Remediation
Upgrade domutils to version 4.1.0 or higher.
References
high severity
- Vulnerable module: fast-xml-parser
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › fast-xml-parser@4.5.7
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
wspackage
Remediation
Upgrade fast-xml-parser to version 5.5.6 or higher.
References
high severity
new
- Vulnerable module: form-data
- Introduced through: form-data@4.0.5
Detailed paths
-
Introduced through: web@gotois/secretary-web › form-data@4.0.5Remediation: Upgrade to form-data@4.0.6.
Overview
Affected versions of this package are vulnerable to CRLF Injection via _multiPartHeader and _getContentDisposition in lib/form_data.js, which concatenate the field name and filename option directly into the Content-Disposition header without escaping CR (\r), LF (\n), or ". An attacker who controls the field name or filename passed to FormData#append can embed CRLF sequences and boundary strings to inject additional part headers or smuggle whole extra multipart parts into requests forwarded to a backend server, enabling field injection or override of trusted fields such as is_admin or role.
Note: This is only exploitable when the consuming application passes attacker-controlled data as a field name or filename to FormData#append.
Workaround
Until upgrading, validate or reject field names and filenames that contain control characters before calling append:
if (/[\r\n]/.test(field)) { throw new Error('invalid field name'); }
PoC
const FormData = require('form-data');
const form = new FormData();
form.append('email"\r\nX-Injected: true\r\nfake="', 'user@example.com');
console.log(form.getBuffer().toString());
Before the fix this emits an injected X-Injected: true header line. A field name that also includes --<boundary> sequences can introduce additional parts (e.g. an extra name="is_admin" field), which a downstream parser accepts as legitimate.
Note: No environment (runtime version, OS, or configuration) is stated in the proof-of-concept section.
Remediation
Upgrade form-data to version 2.5.6, 3.0.5, 4.0.6 or higher.
References
high severity
- Vulnerable module: music-metadata
- Introduced through: music-metadata@7.14.0 and secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › music-metadata@7.14.0Remediation: Upgrade to music-metadata@11.12.3.
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › music-metadata@7.14.0
Overview
music-metadata is a Music metadata parser for Node.js, supporting virtual any audio and tag format.
Affected versions of this package are vulnerable to Infinite loop through the parseExtensionObject process in the ASF parser when handling a sub-object with objectSize = 0. An attacker can cause the application to hang indefinitely by providing a specially crafted .asf file that triggers an infinite loop during parsing.
Remediation
Upgrade music-metadata to version 11.12.3 or higher.
References
high severity
new
- Vulnerable module: parse5
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › parse5@7.3.0
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › parse5-htmlparser2-tree-adapter@7.1.0 › parse5@7.3.0
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › parse5-parser-stream@7.1.2 › parse5@7.3.0
Overview
Affected versions of this package are vulnerable to Uncaught Exception in the Preprocessor class, whose _processSurrogate method pairs a code unit with a following low surrogate without confirming the first unit is a high surrogate. Two consecutive low surrogates such as U+DC00 U+DC00 decode to the out-of-range code point 0x110000, and String.fromCodePoint throws a RangeError that propagates out of parse, parseFragment, and the SAX and streaming parsers. An attacker who can supply HTML to an application that parses it, directly or through a dependent such as cheerio or jsdom, can crash the Node.js process with a few bytes of input. This affects parse5 built on the TypeScript tokenizer, where characters are emitted with String.fromCodePoint.
Remediation
Upgrade parse5 to version 8.1.1 or higher.
References
high severity
- Vulnerable module: undici
- Introduced through: @digitalbazaar/vc@7.1.2
Detailed paths
-
Introduced through: web@gotois/secretary-web › @digitalbazaar/vc@7.1.2 › jsonld@8.3.3 › @digitalbazaar/http-client@3.4.1 › undici@5.29.0Remediation: Upgrade to @digitalbazaar/vc@7.3.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
- Vulnerable module: undici
- Introduced through: @digitalbazaar/vc@7.1.2
Detailed paths
-
Introduced through: web@gotois/secretary-web › @digitalbazaar/vc@7.1.2 › jsonld@8.3.3 › @digitalbazaar/http-client@3.4.1 › undici@5.29.0Remediation: Upgrade to @digitalbazaar/vc@7.3.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
- Vulnerable module: undici
- Introduced through: @digitalbazaar/vc@7.1.2
Detailed paths
-
Introduced through: web@gotois/secretary-web › @digitalbazaar/vc@7.1.2 › jsonld@8.3.3 › @digitalbazaar/http-client@3.4.1 › undici@5.29.0Remediation: Upgrade to @digitalbazaar/vc@7.3.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
- Vulnerable module: undici
- Introduced through: @digitalbazaar/vc@7.1.2
Detailed paths
-
Introduced through: web@gotois/secretary-web › @digitalbazaar/vc@7.1.2 › jsonld@8.3.3 › @digitalbazaar/http-client@3.4.1 › undici@5.29.0Remediation: Upgrade to @digitalbazaar/vc@7.3.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 via unhandled ERR_TLS_CERT_ALTNAME_INVALID errors in onHttpSocketError, onHttp2SessionError, and onHttp2SocketError. When a TLS connection is established and the server's certificate fails Subject Alternative Name validation post-connect, the error propagates and triggers a failed assert call, crashing the process. An attacker who can cause the client to connect to a server presenting an invalid TLS certificate can exploit this to crash the Node.js process.
Remediation
Upgrade undici to version 6.29.1, 7.30.1, 8.12.2 or higher.
References
high severity
- Vulnerable module: pdfjs-dist
- Introduced through: pdf-to-png-converter@3.18.0
Detailed paths
-
Introduced through: web@gotois/secretary-web › pdf-to-png-converter@3.18.0 › pdfjs-dist@5.6.205Remediation: Upgrade to pdf-to-png-converter@4.2.0.
Overview
pdfjs-dist is a Portable Document Format (PDF) library that is built with HTML5.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the enableScripting configuration when loading a crafted PDF file. An attacker can execute arbitrary JavaScript code in the context of the hosting domain by enticing a user to open a malicious PDF. This is only exploitable if enableScripting is set to true and no Content Security Policy is configured to disallow script-src.
Workaround
This vulnerability can be mitigated by setting enableScripting to false or by configuring a Content Security Policy to disallow script-src.
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 < and > can be coded as > 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 pdfjs-dist to version 6.2.108 or higher.
References
high severity
- Vulnerable module: @modelcontextprotocol/sdk
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › @modelcontextprotocol/sdk@1.29.0
Overview
@modelcontextprotocol/sdk is a Model Context Protocol implementation for TypeScript
Affected versions of this package are vulnerable to Open Redirect via unconstrained redirect-following in the HTTP fetch layer used by auth.ts, sse.ts, and streamableHttp.ts. When the client performs OAuth metadata discovery, token requests, or client registration, it follows HTTP redirects without verifying that the redirect destination remains within the original request's origin. An attacker who can interpose a redirect response (for example, through a compromised or malicious server) can cause the client to send authentication credentials, OAuth tokens, or other sensitive headers to an attacker-controlled origin, resulting in credential exfiltration and limited request forgery.
Remediation
Upgrade @modelcontextprotocol/sdk to version 1.32.0 or higher.
References
high severity
- Vulnerable module: undici
- Introduced through: @digitalbazaar/vc@7.1.2
Detailed paths
-
Introduced through: web@gotois/secretary-web › @digitalbazaar/vc@7.1.2 › jsonld@8.3.3 › @digitalbazaar/http-client@3.4.1 › undici@5.29.0Remediation: Upgrade to @digitalbazaar/vc@7.3.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
- Vulnerable module: fast-xml-parser
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › fast-xml-parser@4.5.7
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
- Vulnerable module: undici
- Introduced through: @digitalbazaar/vc@7.1.2
Detailed paths
-
Introduced through: web@gotois/secretary-web › @digitalbazaar/vc@7.1.2 › jsonld@8.3.3 › @digitalbazaar/http-client@3.4.1 › undici@5.29.0Remediation: Upgrade to @digitalbazaar/vc@7.3.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 unbounded automatic PONG write queuing in the WebSocket ByteParser receiver. A remote attacker can send a flood of PING control frames over a standard WebSocket connection, causing the outbound write queue to grow without bound because each inbound PING triggers an automatic PONG reply that is enqueued regardless of socket backpressure, exhausting memory and crashing the process.
Remediation
Upgrade undici to version 6.29.1, 7.30.1, 8.12.2 or higher.
References
high severity
- Vulnerable module: @modelcontextprotocol/sdk
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › @modelcontextprotocol/sdk@1.29.0
Overview
@modelcontextprotocol/sdk is a Model Context Protocol implementation for TypeScript
Affected versions of this package are vulnerable to Incorrect Authorization via the verifyBearerToken function in bearer authentication middleware, which fails to validate the resource (audience) claim of incoming tokens against the expected resource identifier. An attacker in possession of a valid token issued for a different resource can present that token to gain unauthorized access, because the middleware accepts any token whose scopes match without confirming that the token's AuthInfo.resource corresponds to the intended server. This constitutes a token audience confusion attack, allowing cross-resource token reuse.
Remediation
Upgrade @modelcontextprotocol/sdk to version 1.32.0 or higher.
References
high severity
- Module: ffmpeg-static
- Introduced through: ffmpeg-static@5.2.0
Detailed paths
-
Introduced through: web@gotois/secretary-web › ffmpeg-static@5.2.0
GPL-3.0 license
medium severity
new
- Vulnerable module: domutils
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › cheerio-select@2.1.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › htmlparser2@10.1.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › cheerio-select@2.1.0 › css-select@5.2.2 › domutils@3.2.2
Overview
Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity via find() and findAll() in src/querying.ts, which maintain stacks of child-node arrays using unshift() and shift() at the front of the array. Because these operations shift every existing entry on each call, traversing a deeply nested document takes time quadratic in its nesting depth. An attacker can supply a deeply nested HTML or XML document to any API built on these functions - including filter(), getElements(), getElementsByTagName(), getElementsByClassName(), and getElementsByTagType() - to block the Node.js event loop. A document of 100,000 nested <b> tags (approximately 300 KB) causes findAll() to run for about 2 seconds.
Workaround
Reject documents nested deeper than the application requires before searching them, or run the search in a worker thread that is terminated after a time limit.
PoC
import { parseDocument } from "htmlparser2";
import { findAll } from "domutils";
const doc = parseDocument("<b>".repeat(100_000));
console.time("findAll");
findAll(() => false, doc.children); // about 2 s with domutils 4.0.2
console.timeEnd("findAll");
Remediation
Upgrade domutils to version 4.1.0 or higher.
References
medium severity
new
- Vulnerable module: domutils
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › cheerio-select@2.1.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › htmlparser2@10.1.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › cheerio-select@2.1.0 › css-select@5.2.2 › domutils@3.2.2
Overview
Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity via compareDocumentPosition(), which builds each node's ancestor chain using unshift(), causing every existing entry in the chain to be shifted on each insertion and making the comparison take time quadratic in the nesting depth of the nodes. An attacker can supply an HTML or XML document with deeply nested elements and trigger a comparison or sort via uniqueSort() to block the Node.js event loop.
Workaround
Reject documents nested deeper than the application requires before comparing or sorting their nodes.
PoC
import { parseDocument } from "htmlparser2";
import { compareDocumentPosition } from "domutils";
let parent = parseDocument("<b>".repeat(100_000) + "<i></i><u></u>");
while (parent.children.length === 1) parent = parent.children[0];
console.time("compare");
compareDocumentPosition(parent.children[0], parent.children[1]); // about 1 s with domutils 4.0.2
console.timeEnd("compare");
Note: The PoC states it takes about 1 second with domutils 4.0.2 on Node.js.
Remediation
Upgrade domutils to version 4.1.0 or higher.
References
medium severity
new
- Vulnerable module: domutils
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › cheerio-select@2.1.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › htmlparser2@10.1.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › cheerio-select@2.1.0 › css-select@5.2.2 › domutils@3.2.2
Overview
Affected versions of this package are vulnerable to Uncontrolled Recursion via getText(), textContent(), and innerText() in src/stringify.ts, which call themselves once per level of nesting. An attacker can supply an HTML or XML document with approximately 10,000 nested elements to exhaust the JavaScript call stack, triggering a RangeError that fails the request or terminates the Node.js process.
PoC
import { parseDocument } from "htmlparser2";
import { getText } from "domutils";
getText(parseDocument("<b>".repeat(10_000) + "x").children);
// RangeError: Maximum call stack size exceeded
Remediation
Upgrade domutils to version 4.1.0 or higher.
References
medium severity
new
- Vulnerable module: domutils
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › cheerio-select@2.1.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › htmlparser2@10.1.0 › domutils@3.2.2
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › cheerio@1.2.0 › cheerio-select@2.1.0 › css-select@5.2.2 › domutils@3.2.2
Overview
Affected versions of this package are vulnerable to Uncontrolled Recursion via findOne(), existsOne(), and getElementById(), which recurse once per level of nesting in a document. An attacker can supply HTML or XML with approximately 20,000 nested elements to exhaust the JavaScript call stack, causing a RangeError that results in request failures or process termination.
PoC
import { parseDocument } from "htmlparser2";
import { findOne } from "domutils";
findOne(() => false, parseDocument("<b>".repeat(20_000)).children);
// RangeError: Maximum call stack size exceeded
Remediation
Upgrade domutils to version 4.1.0 or higher.
References
medium severity
new
- Vulnerable module: fast-xml-parser
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › fast-xml-parser@4.5.7
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 Regular Expression Denial of Service (ReDoS) via scanAttributeTokens in src/validator.js, which exhibits quadratic time complexity when processing an attribute string containing a leading-whitespace run followed by a stray = character. When the scanner encounters a = with no preceding attribute name, it resets the cursor to one past the token start rather than past the =, causing the entire whitespace run to be rescanned on every loop iteration. An attacker can send a few-hundred-kilobyte XML document to any service that calls XMLValidator.validate() or XMLParser.parse(xml, true) to stall the Node.js event loop for tens of seconds, constituting a remote denial of service.
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:
AThe 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.DFinally, 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:
- CCC
- CC+C
- C+CC
- 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 fast-xml-parser to version 5.12.1 or higher.
References
medium severity
- Vulnerable module: file-type
- Introduced through: music-metadata@7.14.0 and secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › music-metadata@7.14.0 › file-type@16.5.4Remediation: Upgrade to music-metadata@11.3.0.
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › music-metadata@7.14.0 › file-type@16.5.4
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › jimp@0.22.12 › @jimp/custom@0.22.12 › @jimp/core@0.22.12 › file-type@16.5.4
Overview
Affected versions of this package are vulnerable to Infinite loop in the FileTypeParser class. This is triggered when the ASF (WMV/WMA) parser receives input including an ASF sub-header with a size value of 0. An attacker can interrupt service with a 55-byte payload.
Remediation
Upgrade file-type to version 21.3.1 or higher.
References
medium severity
- Vulnerable module: form-data
- Introduced through: form-data@4.0.5
Detailed paths
-
Introduced through: web@gotois/secretary-web › form-data@4.0.5Remediation: Upgrade to form-data@4.0.6.
Overview
Affected versions of this package are vulnerable to CRLF Injection via the _multiPartHeader function when untrusted input is provided via field or filename to FormData#append. An attacker can inject additional headers or multipart parts by including carriage returns, line feeds, or double quotes in the input. This can allow the modification or addition of form fields visible to downstream parsers.
PoC
const FormData = require('form-data');
const form = new FormData();
form.append('email"\r\nX-Injected: true\r\nfake="', 'user@example.com');
console.log(form.getBuffer().toString());
Remediation
Upgrade form-data to version 2.5.6, 3.0.5, 4.0.6 or higher.
References
medium severity
- Vulnerable module: minimatch
- Introduced through: zip-pack-unpack@0.0.3
Detailed paths
-
Introduced through: web@gotois/secretary-web › zip-pack-unpack@0.0.3 › archiver@5.3.2 › archiver-utils@2.1.0 › glob@7.2.3 › minimatch@3.1.5
-
Introduced through: web@gotois/secretary-web › zip-pack-unpack@0.0.3 › archiver@5.3.2 › zip-stream@4.1.1 › archiver-utils@3.0.4 › glob@7.2.3 › minimatch@3.1.5
-
Introduced through: web@gotois/secretary-web › zip-pack-unpack@0.0.3 › archiver@5.3.2 › readdir-glob@1.1.3 › minimatch@5.1.9
Overview
minimatch is a minimal matching utility.
Affected versions of this package are vulnerable to Asymmetric Resource Consumption (Amplification) in the firstPhasePreProcess method, where the **/.. transform clones a globParts entry and pushes the clone back onto the same array inside a do...while (didSomething) fixpoint loop. An attacker can exhaust CPU and memory by supplying a glob pattern whose **/.. sequences regenerate entries during preprocessing, which secondPhasePreProcess then compares in an O(n^2) pairwise partsMatch pass over the expanded set. Exploitation requires the pattern to be parsed with optimizationLevel set to 2 or higher.
Remediation
Upgrade minimatch to version 11.0.1 or higher.
References
medium severity
- Vulnerable module: music-metadata
- Introduced through: music-metadata@7.14.0 and secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › music-metadata@7.14.0Remediation: Upgrade to music-metadata@11.16.0.
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › music-metadata@7.14.0
Overview
music-metadata is a Music metadata parser for Node.js, supporting virtual any audio and tag format.
Affected versions of this package are vulnerable to Infinite loop via the StsdAtom.get method in lib/mp4/AtomToken.ts when parsing MP4 files. The method iterates over stsd sample entries using an attacker-controlled numberOfEntries value without validating individual entry sizes or atom boundaries, allowing an attacker to supply a malformed MP4 file with invalid or oversized sample entry size fields that trigger an unhandled error and crash the process.
Remediation
Upgrade music-metadata to version 11.16.0 or higher.
References
medium severity
- Vulnerable module: music-metadata
- Introduced through: music-metadata@7.14.0 and secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › music-metadata@7.14.0Remediation: Upgrade to music-metadata@11.16.0.
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › music-metadata@7.14.0
Overview
music-metadata is a Music metadata parser for Node.js, supporting virtual any audio and tag format.
Affected versions of this package are vulnerable to Memory Allocation with Excessive Size Value via the ID3v2 tag parser in lib/id3v2/ID3v2Parser.ts, where a declared tag size in an ID3v2 header is not validated against the actual remaining file size before memory allocation. An attacker can supply an audio file with an inflated id3Header.size value, causing the parser to attempt allocation of an arbitrarily large buffer and crashing the process.
Remediation
Upgrade music-metadata to version 11.16.0 or higher.
References
medium severity
- Vulnerable module: music-metadata
- Introduced through: music-metadata@7.14.0 and secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › music-metadata@7.14.0Remediation: Upgrade to music-metadata@11.16.0.
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › music-metadata@7.14.0
Overview
music-metadata is a Music metadata parser for Node.js, supporting virtual any audio and tag format.
Affected versions of this package are vulnerable to Memory Allocation with Excessive Size Value via the APEv2 tag parser in APEv2Parser.ts, where a malicious audio file can specify an arbitrarily large tagItemHeader.size value that causes the parser to allocate a correspondingly large Uint8Array before any bytes are read, exhausting available memory and crashing the process.
Remediation
Upgrade music-metadata to version 11.16.0 or higher.
References
medium severity
- Vulnerable module: music-metadata
- Introduced through: music-metadata@7.14.0 and secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › music-metadata@7.14.0Remediation: Upgrade to music-metadata@11.16.0.
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › music-metadata@7.14.0
Overview
music-metadata is a Music metadata parser for Node.js, supporting virtual any audio and tag format.
Affected versions of this package are vulnerable to Memory Allocation with Excessive Size Value via the MP4 atom parser in lib/mp4/Atom.ts, where atom header sizes are not validated before payload allocation. An attacker can supply an MP4 file with malformed atom size fields - including values that exceed safe integer limits, extend beyond file or parent container boundaries, or describe truncated headers - causing uncontrolled resource consumption or a crash.
Remediation
Upgrade music-metadata to version 11.16.0 or higher.
References
medium severity
- Vulnerable module: music-metadata
- Introduced through: music-metadata@7.14.0 and secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › music-metadata@7.14.0Remediation: Upgrade to music-metadata@11.16.0.
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › music-metadata@7.14.0
Overview
music-metadata is a Music metadata parser for Node.js, supporting virtual any audio and tag format.
Affected versions of this package are vulnerable to Memory Allocation with Excessive Size Value via the EBML element parser in EbmlIterator.ts, where an attacker-controlled element length field is not validated before buffer or string allocation. By supplying an EBML input with an oversized declared leaf element length, an attacker can trigger allocation of hundreds of megabytes or gigabytes of memory, crashing the process.
Remediation
Upgrade music-metadata to version 11.16.0 or higher.
References
medium severity
- Vulnerable module: music-metadata
- Introduced through: music-metadata@7.14.0 and secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › music-metadata@7.14.0Remediation: Upgrade to music-metadata@11.15.0.
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › music-metadata@7.14.0
Overview
music-metadata is a Music metadata parser for Node.js, supporting virtual any audio and tag format.
Affected versions of this package are vulnerable to Uncaught Exception via the DSF parser (DsfParser) when processing a malformed DSF file whose chunk header declares a size smaller than the chunk header itself. This produces a negative skip length passed to tokenizer.ignore(), which strtok3 rejects. Because the ignore() call was not awaited, the resulting promise rejection escapes the parser's promise chain and terminates the Node.js process as an unhandled rejection.
Remediation
Upgrade music-metadata to version 11.15.0 or higher.
References
medium severity
- Vulnerable module: undici
- Introduced through: @digitalbazaar/vc@7.1.2
Detailed paths
-
Introduced through: web@gotois/secretary-web › @digitalbazaar/vc@7.1.2 › jsonld@8.3.3 › @digitalbazaar/http-client@3.4.1 › undici@5.29.0Remediation: Upgrade to @digitalbazaar/vc@7.3.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
new
- Vulnerable module: fast-xml-parser
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › fast-xml-parser@4.5.7
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 Inefficient Algorithmic Complexity in the readStopNodeData() function in OrderedObjParser.js. An attacker can block the event loop by supplying XML in which a stop node body contains many <a fragments and no closing >, which makes the function rescan the entire remaining input from every <. This affects only applications that set the non-default stopNodes option to match an element in the parsed document.
Remediation
Upgrade fast-xml-parser to version 5.12.0 or higher.
References
medium severity
new
- Vulnerable module: glob
- Introduced through: zip-pack-unpack@0.0.3
Detailed paths
-
Introduced through: web@gotois/secretary-web › zip-pack-unpack@0.0.3 › archiver@5.3.2 › archiver-utils@2.1.0 › glob@7.2.3
-
Introduced through: web@gotois/secretary-web › zip-pack-unpack@0.0.3 › archiver@5.3.2 › zip-stream@4.1.1 › archiver-utils@3.0.4 › glob@7.2.3
Overview
Affected versions of this package are vulnerable to Improper Neutralization in src/ignore.ts, when composing an absolute ignore pattern, the resolved root/cwd path is pasted into a glob string and re-parsed by minimatch. The path is escaped with minimatch's escape(), but that function only escapes { and } when the magicalBraces option is enabled, which glob does not pass. A root or cwd path containing brace expressions (e.g. /root{7,8}) is therefore brace-expanded during re-parsing, causing the resulting ignore pattern to match non-existent paths instead of the real path. The exclusion is silently dropped and the excluded file is returned to the caller.
Note: This is only exploitable when the root or cwd path contains brace characters, which is reachable when those paths are derived from externally supplied data such as tenant IDs, project names, or archive extraction paths.
PoC
import { Volume, createFsFromVolume } from 'memfs'
import { glob } from 'glob'
const vol = new Volume()
const fs = createFsFromVolume(vol)
vol.fromJSON({
'/root{7,8}/keep.txt': 'x',
'/root{7,8}/skip.log': 'x',
})
const res = await glob('*', {
cwd: '/root{7,8}',
root: '/root{7,8}',
fs,
ignore: ['/skip.log'],
platform: 'posix',
})
console.log(res) // [ 'keep.txt', 'skip.log' ] <-- skip.log should be ignored
Control with a plain root path:
vol.fromJSON({ '/root/keep.txt': 'x', '/root/skip.log': 'x' })
await glob('*', {
cwd: '/root', root: '/root', fs, ignore: ['/skip.log'], platform: 'posix',
})
// [ 'keep.txt' ] <-- ignore correctly enforced
Remediation
Upgrade glob to version 14.0.6 or higher.
References
medium severity
- Vulnerable module: undici
- Introduced through: @digitalbazaar/vc@7.1.2
Detailed paths
-
Introduced through: web@gotois/secretary-web › @digitalbazaar/vc@7.1.2 › jsonld@8.3.3 › @digitalbazaar/http-client@3.4.1 › undici@5.29.0Remediation: Upgrade to @digitalbazaar/vc@7.3.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
- Vulnerable module: undici
- Introduced through: @digitalbazaar/vc@7.1.2
Detailed paths
-
Introduced through: web@gotois/secretary-web › @digitalbazaar/vc@7.1.2 › jsonld@8.3.3 › @digitalbazaar/http-client@3.4.1 › undici@5.29.0Remediation: Upgrade to @digitalbazaar/vc@7.3.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 interceptors.retry() interceptor, which resumes a partial response and appends the resumed bytes to an already-delivered body, so the delivered body can exceed the declared Content-Length. An attacker can inject bytes beyond the Content-Length into a forwarded response and split the downstream HTTP response by running an upstream that returns a partial response and then resumes it with a Range request, for example a 404 with Content-Length: 2 that sends one byte, closes, then appends 206 Partial Content bytes. This requires the application to enable interceptors.retry(), an untrusted or faulty upstream, and a downstream proxy or gateway that forwards the body without recalculating framing.
Workaround
This vulnerability can be avoided by removing or recalculating Content-Length before forwarding a response body, so a resumed over-length body cannot desynchronize the downstream response.
Remediation
Upgrade undici to version 6.28.1, 7.29.1, 8.10.2 or higher.
References
medium severity
- Vulnerable module: undici
- Introduced through: @digitalbazaar/vc@7.1.2
Detailed paths
-
Introduced through: web@gotois/secretary-web › @digitalbazaar/vc@7.1.2 › jsonld@8.3.3 › @digitalbazaar/http-client@3.4.1 › undici@5.29.0Remediation: Upgrade to @digitalbazaar/vc@7.3.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
new
- Vulnerable module: undici
- Introduced through: @digitalbazaar/vc@7.1.2
Detailed paths
-
Introduced through: web@gotois/secretary-web › @digitalbazaar/vc@7.1.2 › jsonld@8.3.3 › @digitalbazaar/http-client@3.4.1 › undici@5.29.0Remediation: Upgrade to @digitalbazaar/vc@7.3.0.
Overview
undici is an An HTTP/1.1 client, written from scratch for Node.js
Affected versions of this package are vulnerable to Insufficiently Protected Credentials via ProxyAgent in lib/dispatcher/proxy-agent.js, which writes proxy credentials (from the auth, token options, or the username and password in the proxy URL) as a proxy-authorization entry directly onto the caller's headers object rather than a copy. Any other agent holding that same object then forwards those credentials to its own proxy. EnvHttpProxyAgent passes the same headers object to both the ProxyAgent it creates for HTTP_PROXY and the one it creates for HTTPS_PROXY, so when the two variables name different proxies, one proxy receives the credentials intended for the other. An application that reuses one headers object across multiple ProxyAgent instances is equally affected, allowing the operator of one proxy to capture credentials meant for another.
Note: This is only exploitable when the headers option is explicitly set on ProxyAgent or EnvHttpProxyAgent.
Workaround
Give each ProxyAgent its own headers object and do not reuse it elsewhere. With EnvHttpProxyAgent, avoid the headers option when HTTP_PROXY and HTTPS_PROXY name different proxies and either one carries credentials; create a separate ProxyAgent for each proxy instead.
Remediation
Upgrade undici to version 6.29.2, 7.30.4, 8.14.1 or higher.
References
medium severity
- Vulnerable module: undici
- Introduced through: @digitalbazaar/vc@7.1.2
Detailed paths
-
Introduced through: web@gotois/secretary-web › @digitalbazaar/vc@7.1.2 › jsonld@8.3.3 › @digitalbazaar/http-client@3.4.1 › undici@5.29.0Remediation: Upgrade to @digitalbazaar/vc@7.3.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
new
- Vulnerable module: xml2js
- Introduced through: secretary-ai@0.0.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › secretary-ai@0.0.1 › jimp@0.22.12 › @jimp/plugins@0.22.12 › @jimp/plugin-print@0.22.12 › load-bmfont@1.4.2 › parse-bmfont-xml@1.1.6 › xml2js@0.5.0
Overview
Affected versions of this package are vulnerable to XML Injection in the escapeCDATA function in lib/builder.js. An attacker can inject arbitrary XML elements and attributes into the generated document by supplying a value, serialized with the cdata option, that contains two or more ]]> sequences, since only the first is escaped and any later one prematurely closes the CDATA section ahead of attacker-controlled content. This requires the application to enable the non-default cdata: true builder option.
Remediation
There is no fixed version for xml2js.
References
medium severity
- Vulnerable module: inflight
- Introduced through: zip-pack-unpack@0.0.3
Detailed paths
-
Introduced through: web@gotois/secretary-web › zip-pack-unpack@0.0.3 › archiver@5.3.2 › archiver-utils@2.1.0 › glob@7.2.3 › inflight@1.0.6
-
Introduced through: web@gotois/secretary-web › zip-pack-unpack@0.0.3 › archiver@5.3.2 › zip-stream@4.1.1 › archiver-utils@3.0.4 › glob@7.2.3 › inflight@1.0.6
Overview
Affected versions of this package are vulnerable to Missing Release of Resource after Effective Lifetime via the makeres function due to improperly deleting keys from the reqs object after execution of callbacks. This behavior causes the keys to remain in the reqs object, which leads to resource exhaustion.
Exploiting this vulnerability results in crashing the node process or in the application crash.
Note: This library is not maintained, and currently, there is no fix for this issue. To overcome this vulnerability, several dependent packages have eliminated the use of this library.
To trigger the memory leak, an attacker would need to have the ability to execute or influence the asynchronous operations that use the inflight module within the application. This typically requires access to the internal workings of the server or application, which is not commonly exposed to remote users. Therefore, “Attack vector” is marked as “Local”.
PoC
const inflight = require('inflight');
function testInflight() {
let i = 0;
function scheduleNext() {
let key = `key-${i++}`;
const callback = () => {
};
for (let j = 0; j < 1000000; j++) {
inflight(key, callback);
}
setImmediate(scheduleNext);
}
if (i % 100 === 0) {
console.log(process.memoryUsage());
}
scheduleNext();
}
testInflight();
Remediation
There is no fixed version for inflight.
References
medium severity
- Vulnerable module: undici
- Introduced through: @digitalbazaar/vc@7.1.2
Detailed paths
-
Introduced through: web@gotois/secretary-web › @digitalbazaar/vc@7.1.2 › jsonld@8.3.3 › @digitalbazaar/http-client@3.4.1 › undici@5.29.0Remediation: Upgrade to @digitalbazaar/vc@7.3.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
- Vulnerable module: undici
- Introduced through: @digitalbazaar/vc@7.1.2
Detailed paths
-
Introduced through: web@gotois/secretary-web › @digitalbazaar/vc@7.1.2 › jsonld@8.3.3 › @digitalbazaar/http-client@3.4.1 › undici@5.29.0Remediation: Upgrade to @digitalbazaar/vc@7.3.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
- Module: ical.js
- Introduced through: ical.js@2.2.1
Detailed paths
-
Introduced through: web@gotois/secretary-web › ical.js@2.2.1
MPL-2.0 license
low severity
- Vulnerable module: undici
- Introduced through: @digitalbazaar/vc@7.1.2
Detailed paths
-
Introduced through: web@gotois/secretary-web › @digitalbazaar/vc@7.1.2 › jsonld@8.3.3 › @digitalbazaar/http-client@3.4.1 › undici@5.29.0Remediation: Upgrade to @digitalbazaar/vc@7.3.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.