org.webjars.npm:undici@7.27.1

  • latest version

    7.27.1

  • first published

    4 years ago

  • latest version published

    2 months ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the org.webjars.npm:undici package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Improper Neutralization

    org.webjars.npm: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.

    How to fix Improper Neutralization?

    Upgrade org.webjars.npm:undici to version 6.28.0, 7.29.0, 8.9.0 or higher.

    [,6.28.0)[7.0.0,7.29.0)[8.0.0,8.9.0)
    • M
    HTTP Request Smuggling

    org.webjars.npm: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.

    How to fix HTTP Request Smuggling?

    Upgrade org.webjars.npm:undici to version 6.28.0, 7.29.0, 8.9.0 or higher.

    [,6.28.0)[7.0.0,7.29.0)[8.0.0,8.9.0)
    • L
    CRLF Injection

    org.webjars.npm: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.

    How to fix CRLF Injection?

    Upgrade org.webjars.npm:undici to version 6.28.0, 7.29.0, 8.9.0 or higher.

    [,6.28.0)[7.0.0,7.29.0)[8.0.0,8.9.0)
    • H
    Information Exposure

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

    Affected versions of this package are vulnerable to Information Exposure via the cache-control parser in lib/util/cache.js used by interceptors.cache(). An attacker can cause a private response to be stored in the shared cache, or terminate request handling, by sending malformed Cache-Control directives such as private="" or mixed private, private="hdr" values from an upstream response. In shared cache mode, a later request with the same cache key can receive another user's cached body and headers, including sensitive Set-Cookie data, and mixed qualified/unqualified private directives can raise an uncaught TypeError that aborts the request.

    How to fix Information Exposure?

    Upgrade org.webjars.npm:undici to version 7.29.0, 8.9.0 or higher.

    [7.0.0,7.29.0)[8.0.0,8.9.0)
    • H
    Interpretation Conflict

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

    Affected versions of this package are vulnerable to Interpretation Conflict via the parseCacheControlHeader function in lib/util/cache.js and the cache interceptor. An attacker can cause a shared cached response containing authenticated data to be stored and later served to another caller by sending a Cache-Control header with a qualified private or no-cache directive padded with optional whitespace around =. The parser misreads forms such as private ="" or no-cache= "authorization", so the cache logic fails to recognize the directive as a qualified restriction and treats the response as cacheable. In shared-cache deployments that forward Authorization headers, this exposes one user’s response body and cookies to a subsequent request for the same cache key, including an unauthenticated request.

    How to fix Interpretation Conflict?

    Upgrade org.webjars.npm:undici to version 7.29.0, 8.9.0 or higher.

    [7.0.0,7.29.0)[8.0.0,8.9.0)
    • H
    Origin Validation Error

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

    Affected versions of this package are vulnerable to Origin Validation Error in the Socks5ProxyAgent. An attacker can intercept or redirect sensitive data, including credentials and request payloads, to unintended origins by exploiting improper verification of origin matching when reusing connection pools. This may also result in responses from incorrect origins being trusted and can lead to silent downgrading of HTTPS requests to HTTP.

    Note: This is only exploitable if the application uses Socks5ProxyAgent (directly or via setGlobalDispatcher) and makes requests to more than one origin.

    How to fix Origin Validation Error?

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

    [7.27.1,)
    • H
    Use of Cache Containing Sensitive Information

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

    Affected versions of this package are vulnerable to Use of Cache Containing Sensitive Information in the cache interceptor. An attacker can obtain another user's authenticated response data by exploiting whitespace-padded field names in the Cache-Control header, causing the cache to incorrectly store and serve private data to subsequent callers, including unauthenticated users.

    Note: This is only exploitable if the cache interceptor is explicitly enabled in shared mode, Authorization headers are forwarded upstream, and cacheable responses with non-canonical qualified private or no-cache directives are received.

    How to fix Use of Cache Containing Sensitive Information?

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

    [7.12.0,)
    • M
    Time-of-check Time-of-use (TOCTOU) Race Condition

    org.webjars.npm: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.

    How to fix Time-of-check Time-of-use (TOCTOU) Race Condition?

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

    [0,)
    • H
    Allocation of Resources Without Limits or Throttling

    org.webjars.npm: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.

    How to fix Allocation of Resources Without Limits or Throttling?

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

    [0,)
    • H
    Permissive List of Allowed Inputs

    org.webjars.npm: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.

    How to fix Permissive List of Allowed Inputs?

    Upgrade org.webjars.npm:undici to version 6.27.0, 7.28.0, 8.5.0 or higher.

    [,6.27.0)[7.0.0,7.28.0)[8.0.0,8.5.0)
    • C
    CRLF Injection

    org.webjars.npm: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.

    How to fix CRLF Injection?

    Upgrade org.webjars.npm:undici to version 6.27.0, 7.28.0, 8.5.0 or higher.

    [,6.27.0)[7.0.0,7.28.0)[8.0.0,8.5.0)
    • M
    Improper Certificate Validation

    org.webjars.npm: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 in the ProxyAgent when configured with a SOCKS5 proxy URI, which causes the requestTls option to be silently dropped. An attacker can intercept and tamper with HTTPS traffic by exploiting the fallback to the default trust store, thereby bypassing user-configured TLS restrictions.

    Note: This is only exploitable if the application uses a SOCKS5 proxy and relies on requestTls for TLS scope restriction.

    How to fix Improper Certificate Validation?

    Upgrade org.webjars.npm:undici to version 7.28.0, 8.5.0 or higher.

    [7.23.0,7.28.0)[8.0.0,8.5.0)