A visit to a crafted webpage would have been enough for a bad guy to munch all your Firefox for Android cookies

So make sure you've updated since July, fandroids


A crafty person could have slurped every single cookie from a Firefox-using Android device by tricking a user to look at a specially crafted HTML file.

So found infosec researcher Pedro Oliveira, who discovered a vulnerability in the way Firefox handled local files through content:// URIs that allowed him to remotely retrieve copies of all cookies saved on the device – giving him access to a reasonable estimate of the websites viewed by the device's user.

While the flaw has been patched in the latest versions of Firefox for Android, Oliveira's writeup of the vuln – and the speed with which Mozilla patched it, by his account – reveals an obscure yet easily exploitable vulnerability, as he put it.

The exploit worked by convincing the user to visit a specific HTML file. The malicious file opened an iframe which called a content:// URI for Firefox's profiles.ini file, which contains information about the user's Firefox profile as well as the cookies. Thanks to Firefox's handling of these URIs, Oliveira was able to walk away with a copy of a local file that a remote attacker should not have been capable of accessing through a webpage.

While the blog post referred to profiles.ini, Oliveira's vulnerability submission to Mozilla extended the exploit to extract cookies associated with a profile.

mozilla

Update Firefox: Mozilla just patched three hijack-me holes and a bunch of other flaws

READ MORE

By using a content:// URI to access local files on the device, the researcher noticed the browser was redirecting these to a file:// URI, indicating it was saving a copy of the requested resource to a private cache directory before loading it.

"These content:// URIs require read and write permissions to be accessed by other apps," Oliveira told The Register. "When sharing URIs between apps (e.g. a 'Share with' routine), the origin app must give permissions to that URI before sharing it. This URI holds the permissions when being shared to the receiver app and it will only be able to access it. However, when the app is processing URIs from itself (not from other apps), these permissions are not enforced, so the app can freely access its content."

Any file loaded by versions of Firefox prior to 68.10.1 would be handled in this way, Oliveira found.

Continuing his explanation, he said: "Because the [malicious] file we downloaded and the file now loaded by the exploit has the same name, it is replaced in the private directory. Now we have a malicious cached file opened, but whose original file has been changed with another one. After the iframe loads, the cached malicious file sends the contents of itself to the malicious webpage. Because the path is the same the origin is also the same so this goes by without any [policy] enforcements."

Mozilla has been asked for comment, though Firefox was updated to version 68.10.1 back in July – patching the vuln. The open-source browser has had its fair share of public vuln reports over the years, including a vaguely similar remote code execution flaw in 2018 which also worked by tricking users into visiting a malicious webpage. ®

Similar topics


Other stories you might like

  • Minimal, systemd-free Alpine Linux releases version 3.16
    A widespread distro that many of its users don't even know they have

    Version 3.16.0 of Alpine Linux is out – one of the most significant of the many lightweight distros.

    Version 3.16.0 is worth a look, especially if you want to broaden your skills.

    Alpine is interesting because it's not just another me-too distro. It bucks a lot of the trends in modern Linux, and while it's not the easiest to set up, it's a great deal easier to get it working than it was a few releases ago.

    Continue reading
  • Verizon: Ransomware sees biggest jump in five years
    We're only here for DBIRs

    The cybersecurity landscape continues to expand and evolve rapidly, fueled in large part by the cat-and-mouse game between miscreants trying to get into corporate IT environments and those hired by enterprises and security vendors to keep them out.

    Despite all that, Verizon's annual security breach report is again showing that there are constants in the field, including that ransomware continues to be a fast-growing threat and that the "human element" still plays a central role in most security breaches, whether it's through social engineering, bad decisions, or similar.

    According to the US carrier's 2022 Data Breach Investigations Report (DBIR) released this week [PDF], ransomware accounted for 25 percent of the observed security incidents that occurred between November 1, 2020, and October 31, 2021, and was present in 70 percent of all malware infections. Ransomware outbreaks increased 13 percent year-over-year, a larger increase than the previous five years combined.

    Continue reading
  • Slack-for-engineers Mattermost on open source and data sovereignty
    Control and access are becoming a hot button for orgs

    Interview "It's our data, it's our intellectual property. Being able to migrate it out those systems is near impossible... It was a real frustration for us."

    These were the words of communication and collaboration platform Mattermost's founder and CTO, Corey Hulen, speaking to The Register about open source, sovereignty and audio bridges.

    "Some of the history of Mattermost is exactly that problem," says Hulen of the issue of closed source software. "We were using proprietary tools – we were not a collaboration platform before, we were a games company before – [and] we were extremely frustrated because we couldn't get our intellectual property out of those systems..."

    Continue reading

Biting the hand that feeds IT © 1998–2022