Faraday: Uncontrolled recursion in NestedParamsEncoder allows stack exhaustion DoS via deeply nested query parameters
Published 19 Jun 2026 · Updated 10 Sept 2026
Is your project on an affected faraday?
Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=2.0.0 <2.14.3
- Fixed in
- 2.14.3
bundle update --conservative faraday # Gemfile: '>= 2.14.3'- Affected
- >=1.0.0 <1.10.6
- Fixed in
- 1.10.6
bundle update --conservative faraday # Gemfile: '>= 1.10.6'Details
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 such as:
a[x][x][x][x]...[x]=1
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 has been patched in version 2.14.3 and backported to 1.10.6.
Is GHSA-98m9-hrrm-r99r in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected faraday, and gives you the command that fixes it.
More advisories for faraday
- LowCVE-2026-33637Faraday has a possible incomplete fix for GHSA-33mh-2634-fwr2: protocol-relative URI objects still bypass host scoping · 18 May 2026
- MediumCVE-2026-25765Faraday affected by SSRF via protocol-relative URL host override in build_exclusive_url · 9 Feb 2026
References
- Linkgithub.com/lostisland/faraday/security/advisories/GHSA-98m9-hrrm-r99r
- Advisorynvd.nist.gov/vuln/detail/CVE-2026-54297
- Linkgithub.com/lostisland/faraday/pull/1681
- Packagegithub.com/lostisland/faraday
- Linkgithub.com/lostisland/faraday/releases/tag/v1.10.6
- Linkgithub.com/lostisland/faraday/releases/tag/v2.14.3
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.