p PatchFirst

PatchFirst · Latest vulnerabilities

fastify vulnerabilities

Vulnerabilities published for fastify in the last 30 days: 1. Listed in the KEV catalogue: 0.

Filter vulnerabilities
Clear filters

Vulnerabilities: 17

  1. CVE-2026-107832

    Low · CVSS 3.7EPSS 0.26%Fix available

    fastify vulnerable to header validation bypass via case-sensitive propertyNames

    fastify is a fast and low overhead web framework for Node.js. In versions 5.12.2 through 5.12.5, the routine that lowercases header names declared in a route schema does not lowercase the enum or const header names nested inside a propertyNames subschema. As a result, a header allow-list or deny-list written with canonical (non-lowercase) casing never matches the incoming lowercased header, so a restricted header passes validation and reaches the route handler. An attacker can therefore bypass a case-sensitive header validation rule and smuggle a forbidden header past the schema, affecting the integrity of request handling. The issue is fixed

    • Update to 5.12.6
    Published Updated
  2. CVE-2026-92081

    Medium · CVSS 5.9EPSS 0.41%Fix available

    fastify vulnerable to Denial of Service via unhandled exception on HTTP/2 trailer responses

    fastify is a fast and low-overhead web framework for Node.js. In versions before 5.12.5, when a route registers a response trailer via reply.trailer() and is served over HTTP/2, fastify unconditionally sets the Transfer-Encoding: chunked header, which is forbidden on HTTP/2, so Node.js throws while serializing the response headers. The exception is not caught and becomes an uncaughtException, so a single unauthenticated HTTP/2 request to any route that uses trailers crashes the server process and drops all in-flight requests, and it can be repeated on every restart. The issue is fixed in fastify 5.12.5, and users should upgrade to 5.12.5 or l

    • Update to 5.12.5
    Published Updated
  3. CVE-2026-84428

    High · CVSS 7.5EPSS 0.52%Fix available

    fastify vulnerable to header validation bypass via incomplete schema case normalization

    fastify versions before 5.12.2 implement the case-insensitive nature of HTTP header names by lowercasing names in a route's header schema before compiling it, but the transformation is incomplete: it lowercases the properties keys and the root-level required array, and does not lowercase the trigger and dependent names inside the JSON Schema Draft 7 dependencies keyword. Because Node stores request header names in lowercase, a canonical-case dependency such as requiring an authentication header whenever a privileged-mode header is present never matches, and the presence assertion is silently skipped. An unauthenticated remote client can there

    • Update to 5.12.2
    Published Updated
  4. CVE-2026-84469

    High · CVSS 7.5EPSS 0.49%Fix available

    fastify vulnerable to request validation bypass via skipped boolean false schemas

    fastify versions before 5.12.2 decide whether to compile a request schema based on JavaScript truthiness, but JSON Schema Draft 7 defines the boolean false as a valid schema that rejects every instance. When an application assigns false to a route's body, querystring, params, or headers schema to deny all input, fastify treats it as a missing schema, compiles no validator, and runs the route handler on any request. An unauthenticated remote client can therefore reach a handler that a valid deny-all schema was intended to make unreachable, a complete validation bypass that can lead to unauthorized state changes or execution of disabled operati

    • Update to 5.12.2
    Published Updated
  5. CVE-2026-76169

    High · CVSS 7.5EPSS 0.53%Fix available

    fastify vulnerable to authentication bypass via malformed URLs reaching encapsulated not-found handlers

    fastify versions >= 4.0.0 and before 5.12.2 can route a malformed URL sent under one plugin prefix to the custom not-found handler of a different sibling plugin, and invoke it without the preHandler hook declared for that handler. The internal not-found router for encapsulated handlers dispatches malformed paths through a single shared handler pointer before URL decoding, ignoring the prefix and skipping the selected handler's normal lifecycle. An unauthenticated attacker can therefore reach an authentication-protected private fallback through an unrelated public prefix and read its full response, bypassing the authentication hook and breakin

    • Update to 5.12.2
    Published Updated
  6. CVE-2026-84504

    High · CVSS 8.1EPSS 0.43%Fix available

    fastify vulnerable to request body replacement via an async validation result collision

    fastify versions before 5.12.2 treat the object resolved by a successful Ajv async validator as the value result protocol used by custom validator compilers. If a request that passes its route schema contains a property named value at the root, fastify replaces the entire request body with that property's value before the handler runs, so the handler receives a different object than the one that satisfied the schema. An authenticated low-privilege caller can use this to make nested data replace the validated body and trigger an operation the route schema did not authorize, leading to unauthorized state changes and data disclosure. Users shoul

    • Update to 5.12.2
    Published Updated
  7. CVE-2026-16732

    Medium · CVSS 6.1EPSS 0.16%Fix available

    fastify vulnerable to X-Forwarded-* spoofing under trustProxy hop-count

    fastify is a fast and low overhead web framework for Node.js. Impact: the fix for CVE-2026-3635 added a guard on the forwarded-header reads used to derive the request host, protocol, hostname, ip, and ips values, checking the connecting address. That guard closes the IP, CIDR, and custom-function forms of trustProxy correctly, because those forms compile to predicates that inspect the connecting address. The hop-count form, where trustProxy is set to a number, compiles to a predicate that structurally ignores the address, so the guard is always satisfied for any hop count of one or more. Applications configured with a numeric trustProxy value

    • Update to 5.12.1
    Published Updated
  8. CVE-2026-18504

    Medium · CVSS 5.4EPSS 0.28%Fix available

    fastify vulnerable to schema validation bypass via root primitive coercion mismatch

    fastify is a fast and low overhead web framework for Node.js. Versions of fastify before 5.12.1 are affected by a schema validation bypass when a request body schema targets a root primitive value. When the schema validates a top-level primitive such as an integer, Ajv can coerce a JSON string into the expected type during validation, but Fastify does not replace the root request body with the coerced value, so the route handler receives the original unvalidated string. As a result, a request that should have failed validation can reach application logic with a value that does not satisfy the schema, which can undermine integrity and access-c

    • Update to 5.12.1
    Published Updated
  9. CVE-2026-3635

    Medium · CVSS 6.1EPSS 0.16%Fix available

    Fastify request.protocol and request.host spoofable via X-Forwarded-Proto/Host from untrusted connections when trustProxy uses restrictive trust function

    Summary When trustProxy is configured with a restrictive trust function (e.g., a specific IP like trustProxy: '10.0.0.1', a subnet, a hop count, or a custom function), the request.protocol and request.host getters read X-Forwarded-Proto and X-Forwarded-Host headers from any connection — including connections from untrusted IPs. This allows an attacker connecting directly to Fastify (bypassing the proxy) to spoof both the protocol and host seen by the application. Affected Versions fastify <= 5.8.2 Impact Applications using request.protocol or request.host for security decisions (HTTPS enforcement, secure cookie flags, CSRF origin checks, UR

    • Update to 5.8.3
    Published Updated
  10. CVE-2026-3419

    Medium · CVSS 5.3EPSS 0.36%Fix available

    Fastify's Missing End Anchor in "subtypeNameReg" Allows Malformed Content-Types to Pass Validation

    Fastify incorrectly accepts malformed `Content-Type` headers containing trailing characters after the subtype token, in violation of RFC 9110 §8.3.1(https://httpwg.org/specs/rfc9110.html#field.content-type). For example, a request sent with Content-Type: application/json garbage passes validation and is processed normally, rather than being rejected with 415 Unsupported Media Type. When regex-based content-type parsers are in use (a documented Fastify feature), the malformed value is matched against registered parsers using the full string including the trailing garbage. This means a request with an invalid content-type may be routed to and

    • Update to 5.8.1
    Published Updated
  11. CVE-2026-25223

    High · CVSS 7.5EPSS 0.88%Fix available

    Fastify's Content-Type header tab character allows body validation bypass

    Fastify is a fast and low overhead web framework, for Node.js. Prior to version 5.7.2, a validation bypass vulnerability exists in Fastify where request body validation schemas specified by Content-Type can be completely circumvented. By appending a tab character (\t) followed by arbitrary content to the Content-Type header, attackers can bypass body validation while the server still processes the body as the original content type. This issue has been patched in version 5.7.2.

    • Update to 5.7.2
    Published Updated
  12. CVE-2026-25224

    Low · CVSS 3.7EPSS 0.55%Fix available

    Fastify Vulnerable to DoS via Unbounded Memory Allocation in sendWebStream

    Fastify is a fast and low overhead web framework, for Node.js. Prior to version 5.7.3, a denial-of-service vulnerability in Fastify’s Web Streams response handling can allow a remote client to exhaust server memory. Applications that return a ReadableStream (or Response with a Web Stream body) via reply.send() are impacted. A slow or non-reading client can trigger unbounded buffering when backpressure is ignored, leading to process crashes or severe degradation. This issue has been patched in version 5.7.3.

    • Update to 5.7.3
    Published Updated
  13. CVE-2025-32442

    High · CVSS 7.5EPSS 0.73%Fix available

    Fastify vulnerable to invalid content-type parsing, which could lead to validation bypass

    Fastify is a fast and low overhead web framework, for Node.js. In versions 5.0.0 to 5.3.0 as well as version 4.29.0, applications that specify different validation strategies for different content types have a possibility to bypass validation by providing a _slightly altered_ content type such as with different casing or altered whitespacing before `;`. This was patched in v5.3.1, but the initial patch did not cover all problems. This has been fully patched in v5.3.2 and v4.29.1. A workaround involves not specifying individual content types in the schema.

    • Update to 4.29.1
    • Update to 5.3.2
    • Update to 5.8.5
    Published Updated
  14. CVE-2022-41919

    Medium · CVSS 4.2EPSS 0.4%Fix available

    Fastify vulnerable to Cross-Site Request Forgery (CSRF) attack via incorrect content type

    Fastify is a web framework with minimal overhead and plugin architecture. The attacker can use the incorrect `Content-Type` to bypass the `Pre-Flight` checking of `fetch`. `fetch()` requests with Content-Type’s essence as "application/x-www-form-urlencoded", "multipart/form-data", or "text/plain", could potentially be used to invoke routes that only accepts `application/json` content type, thus bypassing any CORS protection, and therefore they could lead to a Cross-Site Request Forgery attack. This issue has been patched in version 4.10.2 and 3.29.4. As a workaround, implement Cross-Site Request Forgery protection using `@fastify/csrf'.

    • Update to 3.29.4
    • Update to 4.10.2
    Published Updated
  15. CVE-2022-39288

    High · CVSS 7.5EPSS 59.24%Fix available

    Denial of service in Fastify via Content-Type header

    fastify is a fast and low overhead web framework, for Node.js. Affected versions of fastify are subject to a denial of service via malicious use of the Content-Type header. An attacker can send an invalid Content-Type header that can cause the application to crash. This issue has been addressed in commit `fbb07e8d` and will be included in release version 4.8.1. Users are advised to upgrade. Users unable to upgrade may manually filter out http content with malicious Content-Type headers.

    • Update to 4.8.1
    Published Updated
  16. CVE-2020-8192

    Not ratedEPSS 1.16%Fix available

    CVE-2020-8192

    A denial of service vulnerability exists in Fastify v2.14.1 and v3.0.0-rc.4 that allows a malicious user to trigger resource exhaustion (when the allErrors option is used) with specially crafted schemas.

    • Update to 2.15.1
    Published Updated

Check your server

Check your installed stack and versions against the current vulnerability feeds.

Check your server →