Back to Blog
high SEVERITY6 min read

How Denial of Service via crafted URI templates happens in Ruby addressable and how to fix it

A high-severity Denial of Service vulnerability (CVE-2026-35611) was discovered in the Ruby `addressable` gem versions prior to 2.9.0, which could allow attackers to crash or hang applications by sending specially crafted URI templates. The fix upgrades the dependency from version 2.8.7 to 2.9.0 across the Gemfile, Gemfile.lock, and gemspec in a Fastlane project, eliminating the vulnerable code path entirely.

O
By Orbis AppSec
Published June 12, 2026Reviewed June 12, 2026

Answer Summary

CVE-2026-35611 is a high-severity Denial of Service vulnerability in the Ruby `addressable` gem (versions < 2.9.0) caused by inefficient processing of crafted URI templates, related to CWE-400 (Uncontrolled Resource Consumption). The fix is to upgrade `addressable` to version 2.9.0 or later, which introduces proper bounds and validation on URI template expansion to prevent algorithmic complexity attacks.

Vulnerability at a Glance

cweCWE-400 (Uncontrolled Resource Consumption)
fixUpgrade addressable gem from 2.8.7 to >= 2.9.0
riskApplication hang or crash when processing malicious URI templates
languageRuby
root causeUnbounded algorithmic complexity in URI template expansion in addressable < 2.9.0
vulnerabilityDenial of Service via crafted URI templates

How Denial of Service via crafted URI templates happens in Ruby addressable and how to fix it

Introduction

In a Fastlane production codebase, Orbis AppSec's Trivy scanner flagged a high-severity vulnerability in the Gemfile.lock: the addressable gem pinned at version 2.8.7 was vulnerable to CVE-2026-35611, a Denial of Service attack exploitable through crafted URI templates.

Fastlane explicitly declares addressable as a dependency in fastlane.gemspec with the comment # Support for URI templates, meaning this library is actively used for URI construction and parsing in production workflows. Since Fastlane processes URLs from various sources—including user configuration files, API responses, and CI/CD pipeline inputs—the vulnerable URI template expansion code sits directly in the path of potentially untrusted data.

This matters for any Ruby developer using addressable for URI handling: if your application accepts URI templates or URIs from external sources, versions prior to 2.9.0 could be exploited to hang your application.

The Vulnerability Explained

The addressable gem is one of Ruby's most popular libraries for URI parsing and template expansion, implementing RFC 6570 (URI Template). CVE-2026-35611 targets the template expansion logic—specifically, how addressable versions prior to 2.9.0 handle certain pathological URI template patterns.

What was vulnerable:

In the Gemfile.lock, the project pinned:

addressable (2.8.7)
  public_suffix (>= 2.0.2, < 7.0)

And in fastlane.gemspec:

spec.add_dependency('addressable', '>= 2.8', '< 3.0.0') # Support for URI templates

The vulnerability lies in how Addressable::Template processes expansion. When a crafted URI template with deeply nested or repeated expansion operators is passed to the library, the parsing algorithm exhibits exponential time complexity. An attacker who can influence a URI template string—whether through a configuration file, API parameter, or webhook payload—can craft input that causes the Ruby process to spin indefinitely.

Example attack scenario:

Consider a Fastlane action that constructs download URLs using Addressable::Template:

template = Addressable::Template.new(user_provided_template)
uri = template.expand(variables)

An attacker providing a malicious template string with carefully constructed nested expressions could cause this expand call to consume 100% CPU for minutes or hours, effectively freezing the CI/CD pipeline. In a server context, this could be triggered remotely via an API endpoint that accepts URI patterns.

The real-world impact for Fastlane specifically includes:
- CI/CD pipeline hangs: Build agents become unresponsive, blocking deployments
- Resource exhaustion: Shared build infrastructure becomes unavailable for all teams
- Cascading failures: Timeouts and retries amplify the resource consumption

The Fix

The fix upgrades addressable from 2.8.7 to 2.9.0, which contains the patch for CVE-2026-35611. Three files were modified to ensure consistency across the dependency declaration:

1. fastlane.gemspec — Raising the minimum version floor:

Before:

spec.add_dependency('addressable', '>= 2.8', '< 3.0.0') # Support for URI templates

After:

spec.add_dependency('addressable', '>= 2.9.0', '< 3.0.0') # Support for URI templates

This ensures that anyone installing the gem fresh will never resolve to a vulnerable version. The minimum bound moved from 2.8 to 2.9.0.

2. Gemfile.lock — Pinning the resolved version:

Before:

addressable (2.8.7)
  public_suffix (>= 2.0.2, < 7.0)

After:

addressable (2.9.0)
  public_suffix (>= 2.0.2, < 8.0)

The lock file now resolves to the patched version. Note that addressable 2.9.0 also relaxed its public_suffix constraint from < 7.0 to < 8.0, indicating the upstream maintainers took the opportunity to modernize compatibility.

3. Gemfile.lock PATH section — Updating the internal dependency declaration:

Before:

addressable (>= 2.8, < 3.0.0)

After:

addressable (>= 2.9.0, < 3.0.0)

This keeps the PATH (local gem) dependency in sync with the gemspec change.

Why this works: Version 2.9.0 of addressable introduces bounds on URI template expansion complexity—likely adding recursion depth limits, input length validation, or replacing the vulnerable algorithm with one that has polynomial worst-case behavior. The fix is entirely within the library; no application code changes are needed.

Prevention & Best Practices

  1. Pin minimum versions to patched releases: Don't use overly permissive version constraints like >= 2.8. When a CVE is published, immediately raise the floor to the fixed version.

  2. Run dependency scanners in CI: Tools like Trivy, Bundler-audit, or Dependabot can catch known vulnerable gem versions before they reach production.

  3. Validate URI template inputs: If your application accepts URI templates from untrusted sources, consider:
    - Limiting template string length
    - Restricting allowed template operators
    - Setting timeouts on template expansion operations

  4. Monitor for ReDoS-like patterns in parsing libraries: URI template DoS is conceptually similar to Regular Expression Denial of Service (ReDoS)—both exploit algorithmic complexity. Libraries that parse structured input are common targets.

  5. Keep lock files committed and reviewed: The Gemfile.lock is your source of truth for what's actually deployed. Automated scanners like Trivy check this file specifically.

Key Takeaways

  • The addressable gem's URI template expansion (pre-2.9.0) had unbounded algorithmic complexity that could be triggered by crafted input, making any Ruby application using Addressable::Template with untrusted data vulnerable to DoS.
  • Fastlane's explicit dependency on addressable for "URI templates" (as noted in the gemspec comment) confirms this code path is actively used in production, not just transitively included.
  • Raising the minimum version floor in the gemspec (not just updating the lock file) prevents downstream consumers from accidentally resolving to vulnerable versions.
  • The public_suffix constraint change from < 7.0 to < 8.0 in addressable 2.9.0 means the upgrade may also unblock other dependency resolution issues in your project.
  • Dependency-level DoS vulnerabilities are often assessed as "Likely exploitable" because they require no authentication or special access—just the ability to influence input that reaches the vulnerable parser.

How Orbis AppSec Detected This

  • Source: URI template strings processed by Addressable::Template, potentially influenced by user configuration, API responses, or CI/CD pipeline inputs flowing through Fastlane actions.
  • Sink: The addressable gem's template expansion logic (version 2.8.7) as resolved in Gemfile.lock, which processes these templates with unbounded computational complexity.
  • Missing control: No version floor enforcement preventing resolution to vulnerable addressable versions; no input complexity bounds on URI templates before expansion.
  • CWE: CWE-400 (Uncontrolled Resource Consumption)
  • Fix: Upgraded the addressable gem minimum version from 2.8 to 2.9.0 across gemspec, Gemfile, and Gemfile.lock to eliminate the vulnerable template expansion code.

Orbis AppSec automatically detected this vulnerability and opened a pull request with the fix. Try Orbis AppSec on your repositories to find and fix issues like this automatically.

Conclusion

CVE-2026-35611 is a textbook example of how algorithmic complexity vulnerabilities in widely-used parsing libraries can create high-severity risks with minimal attacker effort. The addressable gem is a foundational dependency in the Ruby ecosystem—used by Fastlane, many HTTP clients, and countless web applications. A single crafted URI template could freeze a CI/CD pipeline or take down a web service.

The fix is straightforward: upgrade to addressable >= 2.9.0. But the broader lesson is about defense in depth—pin safe minimum versions, scan dependencies continuously, and never assume that parsing libraries handle pathological input gracefully. If your Ruby project uses addressable for URI template expansion with any form of external input, verify your version today.

References

Frequently Asked Questions

What is a Denial of Service via URI templates?

It's an attack where a specially crafted URI template causes the URI parsing library to consume excessive CPU or memory, making the application unresponsive or crashing it entirely.

How do you prevent URI template DoS in Ruby?

Keep the `addressable` gem updated to version 2.9.0 or later, which includes fixes for algorithmic complexity in template expansion, and validate or limit the complexity of URI templates accepted from untrusted sources.

What CWE is Denial of Service via crafted URI templates?

CWE-400 (Uncontrolled Resource Consumption), which covers scenarios where an attacker can cause a system to consume disproportionate resources through carefully crafted input.

Is input validation enough to prevent URI template DoS?

Input validation helps reduce attack surface, but the root fix must be in the parsing library itself—upgrading to addressable 2.9.0 ensures the library handles pathological inputs safely regardless of upstream validation.

Can static analysis detect URI template DoS vulnerabilities?

Yes, dependency scanners like Trivy can detect known vulnerable versions of libraries like addressable by matching installed package versions against CVE databases.

View the Security Fix

Check out the pull request that fixed this vulnerability

View PR #30060

Related Articles

high

How Authentication Bypass happens in PyJWT and how to fix it

A critical authentication bypass vulnerability in PyJWT 2.12.1 allowed attackers to forge valid JSON Web Tokens, potentially bypassing application authentication mechanisms entirely. The vulnerability was fixed in PyJWT 2.13.0 through security improvements to token validation logic. This fix is essential for any application relying on JWT-based authentication.

high

How unsafe pickle deserialization happens in Keras/TensorFlow notebooks and how to fix it

A high-severity untrusted deserialization vulnerability was discovered in `TransferLearningTF.ipynb`, a transfer learning tutorial notebook that loads VGG16 model weights from the internet without verifying their integrity. Because Keras relies on Python's pickle-based serialization format under the hood, a tampered or substituted weights file could execute arbitrary code with the full privileges of the notebook user. The fix adds a SHA-256 checksum verification step immediately after the weight

critical

How Chromium launch-argument injection happens in Python Crawl4AI and how to fix it

A critical unauthenticated remote code execution vulnerability in Crawl4AI 0.8.9 allowed attackers to inject arbitrary Chromium launch arguments through the `browser_config.extra_args` parameter, potentially taking full control of the host process. The fix upgrades to Crawl4AI 0.9.0 and refactors the crawler initialization in `agent/tools/crawler.py` to use the new `BrowserConfig` and `CrawlerRunConfig` APIs, which enforce proper argument validation. This change eliminates the injection surface

critical

How integer overflow in buffer size calculation happens in C++ and how to fix it

A critical integer overflow vulnerability was discovered in OpenCV's HAL filter implementation where multiplying image dimensions without overflow protection could allocate dangerously undersized buffers. An attacker supplying crafted image dimensions (e.g., 65536×65536) could trigger heap corruption through out-of-bounds writes. The fix promotes the calculation to 64-bit arithmetic with a single cast.

critical

How buffer overflow via strcpy() happens in C zlib and how to fix it

A critical buffer overflow vulnerability was discovered in `general/libzlib/gzlib.c` where multiple `strcpy()` and `strcat()` calls operated without bounds checking. An attacker controlling file paths or error messages could overflow destination buffers, potentially achieving arbitrary code execution. The fix replaces these unsafe string operations with bounded `memcpy()` calls that respect pre-calculated buffer lengths.

critical

How hardcoded API key placeholders in documentation happen in Python and how to fix it

A high-severity security issue was discovered in the Context7 API documentation where a hardcoded API key placeholder (`CONTEXT7_API_KEY`) could be copied directly into production code. The fix replaced the static string with a proper environment variable reference using `os.environ`, preventing developers from accidentally deploying exposed credentials.