Can still spoof via long runs of %0A in filename download (firefox android) (bypass of 1906024)
Categories
(Firefox for Android :: Downloads, defect)
Tracking
()
People
(Reporter: sas.kunz, Assigned: titouan)
References
Details
(Keywords: csectype-spoof, reporter-external, sec-moderate, Whiteboard: [client-bounty-form] [adv-main138+])
Attachments
(5 files, 1 obsolete file)
after fixed https://bugzilla.mozilla.org/show_bug.cgi?id=1906024 the special characters have been sanitized to be "" , but i try using %0A on filename, the %0A is not sanitized to be "" it lead to spoof
step to produce:
- open http://103.186.0.20/downloadspoofk1.html or downloadspoofk1.html
- click "open" button
impact : victim can be spoofed will think that it is a document file and even though it is an apk file
Updated•7 months ago
|
Comment 4•7 months ago
|
||
How or where does the %0A get turned into \n
? percent-encoding is for URLs, it shouldn't mean anything in the download name attribute! And if we are turning it into a newline, why didn't the \s
in the regexp catch it? My first reaction was to worry that we weren't doing a multi-line regexp, but we have a testcase that handles "new\u000Aline" correctly.
For comparison, on Desktop the '%' gets dropped somewhere and "0A" are left a literal characters in the name.
Comment 5•7 months ago
|
||
Sorry for the delay, I was OOO and only now have I caught up to this and investigated this.
[:dveditz] We are not decoding before (or as part of) sanitizing the file name. The usage that causes this sanitizes the file name and then decodes this. https://searchfox.org/mozilla-central/source/mobile/android/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineSession.kt#1262
I think we should decode before sanitizing, that will enable regex to sanitize the file name as intended, it's not perf intensive and will solve this issue. Let me know your thoughts on this when you can.
Comment 6•7 months ago
|
||
The severity field is not set for this bug.
:007, could you have a look please?
For more information, please visit BugBot documentation.
Updated•7 months ago
|
Updated•6 months ago
|
Assignee | ||
Comment 7•6 months ago
|
||
Assignee | ||
Comment 8•6 months ago
|
||
Updated•6 months ago
|
Updated•6 months ago
|
Comment 10•5 months ago
|
||
![]() |
||
Comment 11•5 months ago
|
||
linting failure(AC task also reports unused import)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/mobile/android/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineSession.kt:56:1 | Unused import (standard:no-unused-imports)
Comment 12•5 months ago
|
||
![]() |
||
Comment 13•5 months ago
|
||
Assignee | ||
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Comment 14•4 months ago
|
||
Comment 15•3 months ago
|
||
a month ago, RyanVM placed a reminder on the bug using the whiteboard tag [reminder-test 2025-05-28]
.
titouan, please refer to the original comment to better understand the reason for the reminder.
Comment 16•3 months ago
|
||
![]() |
||
Comment 17•3 months ago
|
||
Assignee | ||
Updated•3 months ago
|
Updated•16 hours ago
|
Description
•