Skip to content
DoS Disclosed report Intermediate

DoS Attack in Controller Lookup Code

Action Pack caches a global map from URL controller names to controller class names, and this map is populated even when the controller class does not exist. An attacker could send requests to wildcard controller routes to cause unbounded memory growth.

tenderlove Follow

Originally disclosed on HackerOne

  • Triaged in 17 hours
  • Fixed in 5 months
  • Disclosed after 7 months

Summary by the program

Object leak vulnerability for wildcard controller routes in Action Pack

There is an object leak vulnerability for wildcard controllers in Action Pack. This vulnerability has been assigned the CVE identifier CVE-2015-7581.

Versions Affected: >= 4.0.0 and < 5.0.0.beta1 Not affected: < 4.0.0, 5.0.0.beta1 and newer Fixed Versions: 4.2.5.1, 4.1.14.1

Impact

Users that have a route that contains the string ":controller" are susceptible to objects being leaked globally which can lead to unbounded memory growth. To identify if your application is vulnerable, look for routes that contain ":controller".

Internally, Action Pack keeps a map of "url controller name" to "controller class name". This map is cached globally, and is populated even if the controller class doesn't actually exist.

All users running an affected release should either upgrade or use one of the workarounds immediately.

Releases

The FIXED releases are available at the normal locations.

Workarounds

There are no feasible workarounds for this issue.

Patches

To aid users who aren't able to upgrade immediately we have provided patches for the two supported release series. They are in git-am format and consist of a single changeset.

  • 4-1-wildcard_route.patch - Patch for 4.1 series
  • 4-2-wildcard_route.patch - Patch for 4.2 series

Please note that only the 4.1.x and 4.2.x series are supported at present. Users of earlier unsupported releases are advised to upgrade as soon as possible as we cannot guarantee the continued availability of security fixes for unsupported releases.

The original report as published on HackerOne, by tenderlove. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could cause unbounded memory growth, leading to a denial of service; the text does not state that this was demonstrated in practice.

What the attacker needed

Route containing ':controller'; affected version 4.0.0 to 5.0.0.beta1

The fix

The issue was fixed in versions [redacted] and [redacted], and patches were provided for the 4.1 and 4.2 series.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A web framework keeps a lookup table mapping URL controller names to controller classes. It added entries even for controllers that do not exist, and these leaked globally. Someone could keep sending such URLs to grow memory without bound.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by tenderlove

View all

2 more disclosed reports, best first.

More from Ruby on Rails

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.