CVE-2026-54297: Faraday NestedParamsEncoder Stack Exhaustion Denial of Service
Faraday, a popular Ruby HTTP client library, contains a denial-of-service vulnerability in its default query parameter parser. When an application accepts and processes user-supplied query strings through Faraday, an attacker can craft a deeply nested parameter structure that exhausts the Ruby interpreter's call stack, crashing the thread or worker handling that request. This affects Faraday versions 1.0.0 through 1.10.5 and 2.x through 2.14.2. The vulnerability has been patched in versions 1.10.6 and 2.14.3.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-674, CWE-770
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-24 / 2026-07-15
NVD description (verbatim)
Faraday is an HTTP client library abstraction layer that provides a common interface over many adapters. From 1.0.0 until 1.10.6 and 2.14.3, Faraday::NestedParamsEncoder, the default nested query parameter encoder/decoder in Faraday, decodes nested query strings without enforcing a maximum nesting depth. A crafted query string causes Faraday to build a deeply nested Ruby Hash structure. The internal dehash routine then recursively walks this attacker-controlled structure without a depth limit. At sufficient depth, Ruby raises an uncaught SystemStackError (stack level too deep), crashing the calling thread or worker. This can lead to denial of service in applications that pass attacker-controlled query strings to Faraday's nested query parsing or URL-building paths. This vulnerability is fixed in 1.10.6 and 2.14.3.
5 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability resides in Faraday::NestedParamsEncoder, the library's default handler for nested query parameters. The encoder decodes query strings into Ruby Hash objects without enforcing a maximum nesting depth. When processing an attacker-crafted query string with extremely deep nesting levels, the resulting Hash structure causes the internal dehash routine to recurse without depth limits. At sufficient recursion depth, Ruby's interpreter raises an uncaught SystemStackError exception, terminating the calling thread. This is a stack-exhaustion attack exploiting the lack of nesting depth validation during both decoding and the subsequent recursive traversal of the constructed data structure.
Business impact
For SaaS platforms, microservices, and API gateways that use Faraday to proxy or parse user-supplied requests, this vulnerability enables attackers to trigger denial of service by sending crafted HTTP requests. Each malicious request can crash a worker thread, reducing application availability. Widespread exploitation could exhaust all worker threads in a Ruby process pool, making the service unresponsive. Applications that construct Faraday requests from user input or accept query strings from external sources face the highest risk.
Affected systems
Ruby applications using Faraday library versions 1.0.0 through 1.10.5 or 2.0.0 through 2.14.2 are affected. The vulnerability is triggered when these versions process user-controlled query parameters—either directly via Faraday's URL building or through the NestedParamsEncoder. Applications that never use nested parameter encoding or that validate query parameter structure before passing to Faraday are not impacted.
Exploitability
Exploitability is high. The attack requires only network access to send a specially crafted HTTP request; no authentication or user interaction is necessary. Constructing a deeply nested query string is trivial and does not require specialized tools. An attacker can test for vulnerability by sending progressively deeper nested parameters and observing whether the application becomes unresponsive. There is no CISA KEV entry for this vulnerability as of the publication date, indicating it has not been observed in active exploitation campaigns in the wild to date.
Remediation
Upgrade Faraday to version 1.10.6 or later if using the 1.x branch, or to version 2.14.3 or later if using the 2.x branch. Review your Gemfile and update the dependency constraint to pull the patched version. After updating, redeploy affected applications and verify that your HTTP client functionality remains operational in your test environment before rolling out to production.
Patch guidance
For Ruby on Rails and bundled gem-based projects: (1) Update your Gemfile to require 'faraday', '~> 1.10.6' or 'faraday', '~> 2.14.3' depending on your major version. (2) Run 'bundle update faraday' to pull the patched version. (3) Test HTTP client interactions in staging to confirm no regressions. For pinned dependencies, verify against the official Faraday GitHub release page that the version number you are adopting is indeed 1.10.6, 2.14.3, or later. Note that intermediate patch versions may exist; always verify against the vendor advisory for the complete list of safe versions.
Detection guidance
Monitor application logs for SystemStackError exceptions with stack traces mentioning Faraday or nested parameter decoding. Implement request-level logging of inbound query parameters and alert on unusually deep nesting patterns (e.g., more than 50 levels of nested brackets in a single query string). Rate-limit or reject requests with excessively nested query structures at your API gateway or load balancer. For runtime detection, instrument your Faraday middleware to track query parameter depth and abort processing if nesting exceeds a safe threshold (typically 10–20 levels depending on your application's legitimate use cases).
Why prioritize this
This vulnerability scores 7.5 (HIGH) under CVSS 3.1 due to its network-accessible attack surface, lack of authentication requirements, and direct impact on availability. Although not yet observed in active exploitation, the ease of crafting a malicious payload and the potential for complete service disruption in production environments warrant prompt patching. Organizations running customer-facing APIs or microservices that handle user-supplied URLs should prioritize this update.
Risk score, explained
The CVSS 3.1 score of 7.5 reflects: Attack Vector = Network (AV:N), indicating no special access or proximity is required; Attack Complexity = Low (AC:L), as crafting a malicious query string is trivial; Privileges Required = None (PR:N) and User Interaction = None (UI:N), as the attack is fully automated; Scope = Unchanged (S:U), affecting only the vulnerable service; Confidentiality and Integrity = None (C:N, I:N), as the attack does not leak data or corrupt state; Availability = High (A:H), as the vulnerability directly crashes worker threads. The HIGH severity designation appropriately reflects the ease of exploitation and the guaranteed availability impact.
Frequently asked questions
Does this vulnerability require authentication or special privileges to exploit?
No. The vulnerability is triggered by sending a specially crafted HTTP request with a deeply nested query string. An unauthenticated attacker on the network can trigger it without any prior access or credentials.
If I am using Faraday but never parse nested query parameters, am I still at risk?
Your risk is substantially lower. The vulnerability is specific to the NestedParamsEncoder and the processing of nested query structures. If your application only handles flat query parameters or never uses Faraday's query parameter encoding features, you are unlikely to be affected. However, if your application constructs Faraday requests from user input, it is prudent to patch regardless.
What is the difference between versions 1.x and 2.x, and do I need to upgrade to 2.x?
Versions 1.10.6 and 2.14.3 both contain the fix. You should upgrade to the latest patch version within your current major version series. If you are on 1.x, upgrade to 1.10.6 or later. If you are on 2.x, upgrade to 2.14.3 or later. There is no requirement to switch major versions; choose the path that involves the least change to your dependency tree.
Could this vulnerability be used for something other than denial of service?
Based on the vulnerability details, the attack results in a stack overflow that crashes the Ruby interpreter on the affected thread. There is no mechanism for code execution or data exfiltration. The impact is limited to denial of service via thread termination.
This analysis is provided for informational purposes and reflects the vulnerability description and CVSS scoring published as of the modification date. Security assessments should account for your specific infrastructure, network topology, and use of Faraday within your applications. Always test patches in a non-production environment before deployment. Verify patch availability and version numbers against the official Faraday project repository and security advisories. SEC.co makes no warranty as to the accuracy or completeness of remediation guidance and recommends consulting your security team and the vendor's official documentation for definitive patching instructions. Source: NVD (public-domain), retrieved 2026-08-02. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-45664MEDIUMImageMagick MNG Coder Resource Limit Bypass (CVSS 5.3)
- CVE-2023-54365HIGHTraefik HTTP/2 Denial of Service Vulnerability – Rapid Reset Attack
- CVE-2025-46638HIGHDell BSAFE SSL-J Resource Exhaustion DoS Vulnerability
- CVE-2025-61028HIGHOpenLink Virtuoso DoS Vulnerability in time_t_to_dt Component
- CVE-2025-7737HIGHHitachi VSP iSCSI DoS Vulnerability – Patch Guide
- CVE-2026-12151HIGHundici WebSocket Memory Exhaustion DoS Vulnerability
- CVE-2026-28299HIGHSolarWinds Web Help Desk Denial-of-Service Vulnerability – CVSS 8.2
- CVE-2026-34077HIGHReact Router XSS in RSC Redirect Handling – Patch Guidance