Skip to content
SSRF Disclosed report Intermediate CVE-2017-0909

Additional bypass allows SSRF for internal netblocks

The private_address_check gem does not treat [redacted] as a private address, so a filter using it can be bypassed. An attacker could use a URL with that address to reach internal services, as demonstrated against port 22.

edoverflow Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 7 days
  • Disclosed after 7 days

It turns out there is another bypass in the private_address_check gem. The gem does not include 0.0.0.0 in the exclusion list in the first place.

irb(main):001:0> require 'private_address_check'
=> true
irb(main):002:0> PrivateAddressCheck.private_address?("0.0.0.0")
=> false

I was able to bypass your filter by using http://0.0.0.0:22/ as you can see below:

image.png
image.png From the original on HackerOne

Please find a hotfix for this issue attached to this report: (Attachment on the original report: private_address_check.rb.patch). The author of the gem has been notified and should hopefully provide a proper fix very soon.

The original report as published on HackerOne, by edoverflow. 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

Root cause

The private_address_check gem's exclusion list omits [redacted], so it is not classified as a private address.

Impact

An attacker could bypass the SSRF filter and make requests to internal network services, as shown by reaching port 22.

What the attacker needed

Ability to submit a URL to the server

The fix

A hotfix was attached and the gem author was notified to provide a proper fix.

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 server-side request forgery (SSRF) bug lets an attacker make the server fetch a URL of their choosing. The site tried to block requests to internal addresses using a library, but that library missed one special address, [redacted], which can still reach the local machine. So the attacker could point the server at its own internal services.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

More by edoverflow

View all

27 more disclosed reports, best first.

More from HackerOne

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.