Vulnerabilities in pkg:gem/faraday

PACKAGE
Advisory Identifier: GHSA-98m9-hrrm-r99r
Advisory Summary

CVE-2026-54297 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-674: Uncontrolled Recursion) affecting Faraday libraries in the RubyGems ecosystem. The issue involves uncontrolled recursion in nestedparamsencoder allows stack exhaustion dos via deeply nested query parameters. Remediation is available by upgrading affected packages to version 2.14.3, 1.10.6.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/faraday

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/faraday. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-98m9-hrrm-r99r CVE-2026-54297 HIGH Faraday: Uncontrolled recursion in NestedParamsEncoder allows stack exhaustion DoS via deeply nested query parameters
GHSA-5rv5-xj5j-3484 CVE-2026-33637 LOW Faraday has a possible incomplete fix for GHSA-33mh-2634-fwr2: protocol-relative URI objects still bypass host scoping
GHSA-33mh-2634-fwr2 CVE-2026-25765 MODERATE Faraday affected by SSRF via protocol-relative URL host override in build_exclusive_url

CVE-2026-54297 at a Glance

CVE Identifier CVE-2026-54297
GHSA Identifier GHSA-98m9-hrrm-r99r
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-674: Uncontrolled Recursion
Affected Product Faraday
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-54297

To remediate this vulnerability, upgrade all affected Faraday dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

faraday fixed: 2.14.3
Upgrade faraday to 2.14.3
faraday fixed: 1.10.6
Upgrade faraday to 1.10.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for faraday

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-54297, inspect your project dependencies for Faraday:

inspect dependencies for faraday

Analyze the terminal output to locate any version of Faraday in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.14.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-674: Uncontrolled Recursion, where the product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack. In Faraday, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

`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: ```text 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.

CVE-2026-54297 Affected Faraday Versions

2 component(s)
Fixed Versions:
2.14.31.10.6
Product / Package Ecosystem Affected Versions Fixed Version
faraday
RubyGems
≥ 2.0.0
< 2.14.3
2.14.3
faraday
RubyGems
≥ 1.0.0
< 1.10.6
1.10.6

References

Frequently Asked Questions

What is CVE-2026-54297?
CVE-2026-54297 is a security vulnerability in Faraday involving Uncontrolled recursion in NestedParamsEncoder allows stack exhaustion DoS via deeply nested query parameters under CWE-674: Uncontrolled Recursion.
Which Faraday versions are affected?
Affected versions include releases prior to 2.14.3, 1.10.6 across affected packages: faraday.
What version fixes CVE-2026-54297?
Upgrading to 2.14.3, 1.10.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is faraday affected?
Yes, faraday is affected in releases prior to 2.14.3, 1.10.6. Upgrade your dependency to 2.14.3, 1.10.6 or later.
What is the CVSS score of CVE-2026-54297?
CVE-2026-54297 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-54297?
CVE-2026-54297 is classified under CWE-674: Uncontrolled Recursion (The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.).
How can I check RubyGems dependencies for CVE-2026-54297?
Run the dependency tree command: 'inspect dependencies for faraday'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-98m9-hrrm-r99r",
  "modified" : "2026-06-26T19:27:19Z",
  "published" : "2026-06-19T19:35:43Z",
  "aliases" : [ "CVE-2026-54297" ],
  "summary" : "Faraday: Uncontrolled recursion in NestedParamsEncoder allows stack exhaustion DoS via deeply nested query parameters",
  "details" : "`Faraday::NestedParamsEncoder`, the default nested query parameter encoder/decoder in Faraday, decodes nested query strings without enforcing a maximum nesting depth.\n\nA crafted query string such as:\n\n```text\na[x][x][x][x]...[x]=1\n```\n\ncauses 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.\n\nThis has been patched in version 2.14.3 and backported to 1.10.6.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "faraday"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.14.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.14.2"
    }
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "faraday"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "1.10.6"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.10.5"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/lostisland/faraday/security/advisories/GHSA-98m9-hrrm-r99r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-54297"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lostisland/faraday/pull/1681"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/lostisland/faraday"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lostisland/faraday/releases/tag/v1.10.6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lostisland/faraday/releases/tag/v2.14.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-674" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-19T19:35:43Z",
    "nvd_published_at" : "2026-06-24T17:17:29Z"
  }
}