Peplink Smart Reader web interface /cgi-bin/upload_config.cgi data integrity vulnerability
The web interface of Peplink Smart Reader v1.2.0 exposes an unauthenticated endpoint that allows an attacker to upload a crafted configuration file. If an authenticated user applies the staged changes, the attacker can modify the device configuration, including changing the administrative password and locking out legitimate users.
Originally disclosed on Cisco Talos
A data integrity vulnerability exists in the web interface /cgi-bin/uploadconfig.cgi functionality of Peplink Smart Reader v1.2.0 (in QEMU). A specially crafted HTTP request can lead to configuration modification.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
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 upload_config.cgi endpoint lacks any authentication check, allowing unauthenticated users to stage a configuration file that is later applied by an authenticated user.
Impact
An attacker could modify the device configuration, including changing the administrative password, potentially locking out legitimate users and granting future authenticated access to the attacker.
What the attacker needed
Network access to the device; victim applies staged changes
The fix
The vendor released new firmware versions to address the vulnerability.
How it was found
- Create a valid configuration file for the target device.
- Encode the file by creating a tar archive, compressing with gzip, and enciphering with a hard-coded XOR key.
- Send an HTTP POST request with the encoded file to /cgi-bin/upload_config.cgi.
- The file is staged and a prompt is set for the authenticated user to apply changes.
- If the authenticated user applies the changes, the attacker-controlled configuration takes effect.
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.
This device has a web page for configuration, and one part of it lets anyone upload a new settings file without logging in. If an admin later clicks to apply the new settings, the attacker's file takes effect, and the attacker can change the admin password to lock others out. The attacker doesn't need any credentials to start the attack, but they do need an admin to apply the changes.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.