Insufficient validation of untrusted input in Downloads (CVE-2026-0903)
Chrome on Windows failed to rewrite dangerous download extensions such as .lnk and .scf to .download when the suggested filename contained certain percent sequences after a space following the extension. An attacker could deliver a Windows shortcut that Chrome intends to block, potentially leading to code execution or persistence if the user saves and runs it.
- Fix shipped in 4 months
Description
Chrome on Windows can be tricked into delivering dangerous file types (for example, .lnk or .scf) despite the download sanitization that should rewrite them to .download.
When a suggested filename includes certain % sequences after a space following the extension, Chrome strips the % tokens, then re-applies the original extension, yielding a double extension (for example, file.lnk .lnk). As a result, the forbidden extension survives instead of being rewritten.
This appears to be a Windows-only issue, because the Windows file dialog expands or strips %…% patterns and the sanitization path subsequently reattaches the stale extension.
Examples
Content-Disposition: attachment; filename="file.lnk %%"
Result:file.lnk .lnk(expected: file.download)Content-Disposition: attachment; filename="file.scf .%%"
Result:file.scf .scf(expected: file.download)
Expected behavior Dangerous extensions (for example, .lnk, .scf) should always be rewritten to .download. No combination of spaces or % should allow the original extension to persist or reappear.
Observed behavior
Appending " %%" (or similar) after the extension leads to a double extension, allowing .lnk or .scf to survive (for example, file.lnk .lnk). This bypasses Chrome’s dangerous-file protection and presents users with a misleading, executable shortcut.
Security impact This is a sanitization bypass that enables delivery of files Chrome intends to block. A user can be tricked into saving and executing a Windows shortcut (.lnk) that appears benign (for example, disguised as an “image” or document link). Impact includes code execution or persistence via shortcut abuse.
Steps to reproduce
- Run the attached PoC server (poc.py). It serves a page with two tiles and download endpoints that set Content-Disposition.
- Visit
http://127.0.0.1:8000/in Chrome on Windows. - Right-click → “Save link as…” on:
- Control:
/download?case=lnk_plain→filename="file.lnk"(should be rewritten to .download). - Bypass:
/download?case=lnk_pct→filename="file.lnk %%"(often shows file.lnk .lnk).
- Control:
- Observe the suggested filename in the Save dialog and the final saved name.
Note: The PoC serves a harmless payload.download file so the saved file is never HTML. It isolates the filename/extension behavior under Content-Disposition.
Affected versions (observed)
- Stable: 140.0.7339.128
- Beta: 141.0.7390.16
- Dev: 142.0.7405.4
Bisect results (observed)
- Last known developer build without the issue:
Win/1023679(105.0.5178.0 Dev). - First developer build with the issue:
Win/1025642(105.0.5190.0 Dev). - This aligns with commit 5e105f0bc3443e873924b92778574ffbb792c645, which landed in 105.0.5183.0 and modified the Windows filename sanitization logic.
Root cause (high level)
- On Windows, the Save dialog layer strips
%…%from the basename. With inputs like"file.lnk %%", this leaves"file.lnk "(with a trailing space). - Later, the download target logic calls safe-name handling with the pre-sanitization extension (for example, .lnk) while the post-sanitized basename appears extensionless.
- The safe-name logic then re-attaches the old extension, producing file.lnk .lnk and bypassing the .lnk → .download rewrite.
PoC
Attach poc.py (serves a self-contained HTML page and Content-Disposition endpoints). Usage:
Context
Chrome on Windows rewrites dangerous download extensions such as .lnk and .scf to .download before the file reaches the user. That sanitisation is meant to stop a page handing a user an executable Windows shortcut disguised as something harmless. This report describes a way to make the original extension survive that rewrite, producing a double extension such as file.lnk .lnk.
The issue is specific to Windows. The Windows file dialog expands or strips %…% patterns, and the sanitisation path then reattaches the stale extension. The researcher observed the behaviour on Stable 140.0.7339.128, Beta 141.0.7390.16 and Dev 142.0.7405.4.
Setup
No account or special role is needed. The preconditions are:
- Chrome running on Windows.
- A page that serves a download with a
Content-Dispositionheader whosefilenamecontains the crafted value. - The user choosing to save the file, for example through right-click, "Save link as…".
The researcher supplied a PoC server, poc.py, which serves a page with two tiles and download endpoints that set Content-Disposition. The PoC serves a harmless payload.download file so the saved file is never HTML; it isolates the filename and extension behaviour under Content-Disposition.
Finding it
The researcher noticed that appending certain % sequences after a space following the extension defeats the rewrite. When a suggested filename includes those sequences, Chrome strips the % tokens and then re-applies the original extension, yielding a double extension. The forbidden extension survives instead of being rewritten to .download.
The two examples given are:
Content-Disposition: attachment; filename="file.lnk %%"
Result: file.lnk .lnk (expected: file.download).
Content-Disposition: attachment; filename="file.scf .%%"
Result: file.scf .scf (expected: file.download).
Expected behaviour is that dangerous extensions such as .lnk and .scf are always rewritten to .download, and that no combination of spaces or % allows the original extension to persist or reappear. Observed behaviour is that appending " %%" (or similar) after the extension leads to a double extension, allowing .lnk or .scf to survive.
Exploitation
Step 1: start the PoC server
Run the attached PoC server, poc.py. It serves a page with two tiles and download endpoints that set Content-Disposition.
Step 2: open the page in Chrome on Windows
Visit the following URL in Chrome on Windows:
http://[redacted]:8000/
Step 3: save the control link
Right-click, then "Save link as…" on the control endpoint:
/download?case=lnk_plain
This endpoint sets filename="file.lnk". The suggested filename should be rewritten to .download, which confirms the normal protection is active.
Step 4: save the bypass link
Right-click, then "Save link as…" on the bypass endpoint:
/download?case=lnk_pct
This endpoint sets filename="file.lnk %%". The Save dialog often shows file.lnk .lnk.
Step 5: observe the result
Check the suggested filename in the Save dialog and the final saved name. The bypass case keeps the dangerous extension instead of rewriting it.
Root cause
On Windows, the Save dialog layer strips %…% from the basename. With an input such as "file.lnk %%", this leaves "file.lnk " with a trailing space. Later, the download target logic calls safe-name handling with the pre-sanitisation extension (for example, .lnk) while the post-sanitised basename appears extensionless. The safe-name logic then reattaches the old extension, producing file.lnk .lnk and bypassing the .lnk to .download rewrite.
The bisect results point to the same area. The last developer build without the issue was Win/1023679 (105.0.5178.0 Dev), and the first with the issue was Win/1025642 (105.0.5190.0 Dev). This aligns with commit [redacted], which landed in 105.0.5183.0 and modified the Windows filename sanitisation logic.
Impact
This is a sanitisation bypass that enables delivery of files Chrome intends to block. A user can be tricked into saving and executing a Windows shortcut (.lnk) that appears benign, for example disguised as an image or document link. The impact includes code execution or persistence via shortcut abuse. The attack targets a Windows user of Chrome, and the report describes the shortcut as appearing benign to the user.
Fix
The report does not describe a fix. The expected behaviour it states is that dangerous extensions such as .lnk and .scf should always be rewritten to .download, and that no combination of spaces or % should allow the original extension to persist or reappear.
Variants to test
- Other dangerous extensions: replace
.lnkand.scfwith other extensions Chrome rewrites, using the same" %%"suffix. A positive result is a double extension that keeps the original type instead of.download. - Other
%patterns: try sequences other than%%after the space, since the report says "or similar". A positive result is the same double extension in the Save dialog. - Other trailing characters: test spaces and other characters that the Windows dialog may strip or expand. A positive result is a basename that appears extensionless to the safe-name logic while the original extension is reattached.
- Other browsers or platforms: the report says the issue appears Windows-only. Testing the same
Content-Dispositionvalues elsewhere shows whether the behaviour is tied to the Windows dialog layer. - Version boundary: compare builds around 105.0.5178.0 and 105.0.5190.0 Dev, and the commit
[redacted], to confirm the change that introduced the behaviour.
What happened, in plain words
When you download a file in a browser, the website can suggest a name for it. Chrome on Windows has a safety rule: if a website suggests a name ending in a dangerous file type, such as .lnk or .scf, Chrome quietly changes the ending to .download before you save it. A .lnk file is a Windows shortcut, and a .scf file is a small Windows command file. Chrome tries to stop them arriving with those endings.
This report shows a way around that rule. If the suggested name has a space and some % characters after the extension, Chrome ends up saving the file with a doubled ending such as file.lnk .lnk. The dangerous ending survives, so the protection fails. The researcher found this on Windows only, and confirmed it on three Chrome versions: Stable 140.0.7339.128, Beta 141.0.7390.16 and Dev 142.0.7405.4.
Background: the pieces involved
Before the steps, here are the ideas you need.
- A download and its suggested name. When you click a download link, the server sends the file along with a small set of instructions called headers. One of them,
Content-Disposition, tells the browser whether to show the file in the page or save it, and what name to suggest. Thefilenamepart of that header is the suggested name. - File extensions. The letters after the last dot in a filename, like
.jpgor.exe, tell Windows what kind of file it is and which program should open it. Windows treats.lnk(shortcut) and.scf(a small command file) as things it can run. - Sanitisation. This means cleaning up input before using it. Chrome sanitises download names by rewriting dangerous extensions to
.download, so a shortcut cannot arrive looking like a shortcut. - A double extension. A name like
file.lnk .lnkhas two endings. People often read only the last one, or the first one, and get confused about what the file really is. Attackers use this to make an executable file look harmless. %patterns. On Windows, some text between percent signs has a special meaning, and the Windows Save dialog expands or strips those patterns. The report says the dialog strips%…%from the name.- A PoC (proof of concept). A small program that demonstrates a bug without doing harm. Here it is a Python script,
poc.py, that runs a tiny web server on your own computer. [redacted]. This is the address a computer uses to talk to itself, also called localhost. Visitinghttp://[redacted]:8000/opens a page served by a program on your own machine, not on the internet.
Setup
No account or special role is needed. The preconditions are:
- Chrome running on Windows.
- A page that serves a download with a
Content-Dispositionheader whosefilenamecontains the crafted value. - The user choosing to save the file, for example through right-click, "Save link as…".
The researcher supplied a PoC server, poc.py, which serves a page with two tiles and download endpoints that set Content-Disposition. The PoC serves a harmless payload.download file so the saved file is never HTML; it isolates the filename and extension behaviour under Content-Disposition.
In plain words: the PoC page shows two download links, one normal and one crafted. The file behind both links is harmless, so nothing dangerous is ever saved. The point is only to watch what name Chrome suggests in the Save dialog.
Finding it
The researcher noticed that appending certain % sequences after a space following the extension defeats the rewrite. When a suggested filename includes those sequences, Chrome strips the % tokens and then re-applies the original extension, yielding a double extension. The forbidden extension survives instead of being rewritten to .download.
The two examples given are:
Content-Disposition: attachment; filename="file.lnk %%"
Line by line:
Content-Disposition:is the header name. It tells the browser what to do with the file.attachmentmeans "save this as a download" rather than display it in the page.filename="file.lnk %%"is the suggested name. It ends in.lnk, a dangerous type, followed by a space and two percent signs.
Result: file.lnk .lnk (expected: file.download).
Content-Disposition: attachment; filename="file.scf .%%"
Line by line:
- Same header and
attachmentinstruction as above. filename="file.scf .%%"suggests a name ending in.scf, then a space, a dot and two percent signs.
Result: file.scf .scf (expected: file.download).
Expected behaviour is that dangerous extensions such as .lnk and .scf are always rewritten to .download, and that no combination of spaces or % allows the original extension to persist or reappear. Observed behaviour is that appending " %%" (or similar) after the extension leads to a double extension, allowing .lnk or .scf to survive.
Exploitation
Step 1: start the PoC server
Run the attached PoC server, poc.py. It serves a page with two tiles and download endpoints that set Content-Disposition.
Why: you need a page that sends the crafted header. Running the script on your own computer gives you that page without involving any real website.
Step 2: open the page in Chrome on Windows
Visit the following URL in Chrome on Windows:
http://[redacted]:8000/
Line by line:
http://is the normal web protocol.[redacted]is your own computer.:8000is the port number, the channel the PoC server listens on./is the front page.
Why: this loads the page with the two download links.
Step 3: save the control link
Right-click, then "Save link as…" on the control endpoint:
/download?case=lnk_plain
Line by line:
/downloadis the path the PoC server uses to send a file.?case=lnk_plainis a parameter telling the server which test case to use. Here it is the plain one.
This endpoint sets filename="file.lnk". The suggested filename should be rewritten to .download, which confirms the normal protection is active.
Why: this is the control. If Chrome behaves as designed here, you know the protection works and any difference in the next step is caused by the crafted name, not by something else.
Step 4: save the bypass link
Right-click, then "Save link as…" on the bypass endpoint:
/download?case=lnk_pct
Line by line:
- Same
/downloadpath as before. ?case=lnk_pctselects the crafted test case, the one with the percent signs.
This endpoint sets filename="file.lnk %%". The Save dialog often shows file.lnk .lnk.
Why: this is the actual test. You are checking whether the crafted name slips past the rewrite.
Step 5: observe the result
Check the suggested filename in the Save dialog and the final saved name. The bypass case keeps the dangerous extension instead of rewriting it.
Root cause
On Windows, the Save dialog layer strips %…% from the basename. With an input such as "file.lnk %%", this leaves "file.lnk " with a trailing space. Later, the download target logic calls safe-name handling with the pre-sanitisation extension (for example, .lnk) while the post-sanitised basename appears extensionless. The safe-name logic then reattaches the old extension, producing file.lnk .lnk and bypassing the .lnk to .download rewrite.
In plain words: two parts of Chrome handle the name at different moments. The Windows dialog removes the percent signs, leaving a name that looks like it has no ending. A later step remembers the original ending and puts it back. The result is a name with the dangerous ending twice, and the safety rewrite never gets a chance to replace it.
The bisect results point to the same area. The last developer build without the issue was Win/1023679 (105.0.5178.0 Dev), and the first with the issue was Win/1025642 (105.0.5190.0 Dev). This aligns with commit [redacted], which landed in 105.0.5183.0 and modified the Windows filename sanitisation logic.
A bisect means testing a series of older and newer builds to find the exact change that introduced a behaviour. The commit is the code change that matches the boundary.
Impact
This is a sanitisation bypass that enables delivery of files Chrome intends to block. A user can be tricked into saving and executing a Windows shortcut (.lnk) that appears benign, for example disguised as an image or document link. The impact includes code execution or persistence via shortcut abuse. The attack targets a Windows user of Chrome, and the report describes the shortcut as appearing benign to the user.
In plain words: the user can be tricked into saving and executing the file. The danger is that the name looks harmless, so the user may not realise what they are opening.
Fix
The report does not describe a fix. The expected behaviour it states is that dangerous extensions such as .lnk and .scf should always be rewritten to .download, and that no combination of spaces or % should allow the original extension to persist or reappear.
Variants to test
- Other dangerous extensions: replace
.lnkand.scfwith other extensions Chrome rewrites, using the same" %%"suffix. A positive result is a double extension that keeps the original type instead of.download. - Other
%patterns: try sequences other than%%after the space, since the report says "or similar". A positive result is the same double extension in the Save dialog. - Other trailing characters: test spaces and other characters that the Windows dialog may strip or expand. A positive result is a basename that appears extensionless to the safe-name logic while the original extension is reattached.
- Other browsers or platforms: the report says the issue appears Windows-only. Testing the same
Content-Dispositionvalues elsewhere shows whether the behaviour is tied to the Windows dialog layer. - Version boundary: compare builds around 105.0.5178.0 and 105.0.5190.0 Dev, and the commit
[redacted], to confirm the change that introduced the behaviour.
Glossary
- Header: a line of extra information a server sends with a web response, such as what to do with a file.
Content-Disposition: the header that tells the browser whether to show a file in the page or save it, and what name to suggest.- Filename: the name suggested for a downloaded file.
- File extension: the letters after the last dot in a filename, which tell Windows what kind of file it is.
.lnk: a Windows shortcut file, which can run a program when opened..scf: a small Windows command file, which can run commands when opened..download: the harmless ending Chrome uses when it rewrites a dangerous extension.- Sanitisation: cleaning up input before using it, for example rewriting a dangerous extension.
- Sanitisation bypass: a way to get past that cleaning up.
- Double extension: a filename with two endings, such as
file.lnk .lnk, which can mislead a user about the real type. %pattern: text between percent signs that Windows may expand or strip.- PoC (proof of concept): a small program that demonstrates a bug safely.
poc.py: the Python script the researcher supplied, which runs a local web server for the test.- Endpoint: a specific address on a server that does something, such as
/download. - Parameter: a value added to a URL after
?, such ascase=lnk_plain, which tells the server what to do. [redacted]: the address a computer uses to reach itself, also called localhost.- Port: the numbered channel a server listens on, such as
8000. - Control: a normal test case used for comparison, to show the protection works.
- Bisect: testing a series of builds to find the exact change that introduced a behaviour.
- Commit: a recorded code change, identified by a long string such as
[redacted]. - Build: a particular compiled version of a program, such as a Chrome release.
- Code execution: running a program or commands on a computer, often without the user intending it.
- Persistence: keeping access on a computer across restarts, for example through a shortcut that runs again later.
- CVE: a public identifier for a known security flaw.