org.webjars.npm:axios@1.14.0

  • latest version

    1.15.0

  • first published

    10 years ago

  • latest version published

    19 days ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the org.webjars.npm:axios 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
    Server-side Request Forgery (SSRF)

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

    How to fix Server-side Request Forgery (SSRF)?

    Upgrade org.webjars.npm:axios to version 1.15.1 or higher.

    [,1.15.1)
    • M
    Improper Encoding or Escaping of Output

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

    How to fix Improper Encoding or Escaping of Output?

    Upgrade org.webjars.npm:axios to version 1.15.1 or higher.

    [,1.15.1)
    • C
    HTTP Response Splitting

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

    How to fix HTTP Response Splitting?

    Upgrade org.webjars.npm:axios to version 1.15.1 or higher.

    [,1.15.1)
    • M
    Allocation of Resources Without Limits or Throttling

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

    How to fix Allocation of Resources Without Limits or Throttling?

    Upgrade org.webjars.npm:axios to version 1.15.1 or higher.

    [,1.15.1)
    • M
    Allocation of Resources Without Limits or Throttling

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

    How to fix Allocation of Resources Without Limits or Throttling?

    Upgrade org.webjars.npm:axios to version 1.15.1 or higher.

    [,1.15.1)
    • M
    Insertion of Sensitive Information Into Sent Data

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

    How to fix Insertion of Sensitive Information Into Sent Data?

    Upgrade org.webjars.npm:axios to version 1.15.1 or higher.

    [,1.15.1)
    • M
    CRLF Injection

    org.webjars.npm:axios is a promise-based HTTP client for the browser and Node.js.

    Affected versions of this package are vulnerable to CRLF Injection through the FormDataPart multipart header construction in the form-data streaming helper. An attacker can inject arbitrary multipart headers by supplying a Blob-like value whose type contains \r or \n, causing the generated Content-Type line to break and append attacker-controlled header fields. This lets a crafted upload alter the multipart body sent by the application, which can corrupt downstream request parsing and expose or tamper with data handled by the receiving server.

    How to fix CRLF Injection?

    Upgrade org.webjars.npm:axios to version 1.15.1 or higher.

    [1.3.0,1.15.1)
    • C
    Prototype Pollution

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

    How to fix Prototype Pollution?

    Upgrade org.webjars.npm:axios to version 1.15.1 or higher.

    [,1.15.1)
    • H
    Improperly Controlled Modification of Dynamically-Determined Object Attributes

    org.webjars.npm:axios is a promise-based HTTP client for the browser and Node.js.

    Affected versions of this package are vulnerable to Improperly Controlled Modification of Dynamically-Determined Object Attributes through the transformResponse and request serialization paths in the defaults configuration. An attacker can influence JSON parsing and request handling by supplying a crafted object with inherited parseReviver, responseType, transitional, env, or formSerializer properties, causing Axios to read attacker-controlled prototype values during response parsing or form encoding. This can lead to malformed response processing, unexpected parser behavior, and application-level data corruption or denial-of-service in code that passes untrusted config objects to Axios.

    How to fix Improperly Controlled Modification of Dynamically-Determined Object Attributes?

    Upgrade org.webjars.npm:axios to version 1.15.2 or higher.

    [1.0.0,1.15.2)
    • H
    Uncontrolled Recursion

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

    How to fix Uncontrolled Recursion?

    Upgrade org.webjars.npm:axios to version 1.15.1 or higher.

    [,1.15.1)
    • M
    Prototype Pollution

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

    How to fix Prototype Pollution?

    Upgrade org.webjars.npm:axios to version 1.15.1 or higher.

    [,1.15.1)
    • H
    HTTP Response Splitting

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

    How to fix HTTP Response Splitting?

    Upgrade org.webjars.npm:axios to version 1.15.0 or higher.

    [,1.15.0)
    • M
    Unintended Proxy or Intermediary ('Confused Deputy')

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

    How to fix Unintended Proxy or Intermediary ('Confused Deputy')?

    Upgrade org.webjars.npm:axios to version 1.15.0 or higher.

    [,1.15.0)