Skip to content
File upload Write-up Beginner

Download Filename Manipulation due to improper rendering of RTLO characters

The browser's download section rendered Right-To-Left-Override (RTLO) characters in filenames incorrectly, so a file with an APK extension could appear as a text file. An attacker could trick a victim into downloading and installing a malicious APK by disguising it as a harmless text file.

Jayateertha Guruprasad Follow

Published on jayateerthag.medium.com

This is one of the easiest bug that I have found in a private bugbounty program.

Jayateertha Guruprasad, on jayateerthag.medium.com

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the browser did not sanitise or properly handle Unicode bidirectional control characters (such as RTLO) when displaying downloaded filenames, allowing the visual order of characters to be reversed.

Impact

A victim could be tricked into installing a malicious APK because the downloaded file appears to be a text file.

What the attacker needed

Victim uses affected browser; victim downloads file via link

The fix

The bug was fixed quickly in a month and a new release was rolled out.

How it was found

  1. Create a file with an RTLO character in its name so that the extension appears reversed (e.g., an APK file named to look like a text file).
  2. Host the file and create a link to it with the download attribute.
  3. Open the link in the affected browser and download the file.
  4. Observe that the downloaded file's name is displayed with the extension appearing as .txt instead of .apk.

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 write-up has not been written yet. The Original tab links to the source.

Some Unicode characters, like RTLO, change the direction text is displayed. If a browser does not handle them properly, a filename can look like 'textfile.txt' even though the real file is 'textfile.apk'. This means a user might download what looks like a harmless text file but actually install a malicious app.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

More by Jayateertha Guruprasad

View all

10 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.