The Rock Has a Trigger: How Notepad Got Its First 8.8 CVE
A command injection flaw existed in the Markdown link handler of the modern Notepad app, where a crafted .md file with a link to a non-HTTP protocol handler could be forwarded to the OS without validation. An attacker could achieve arbitrary code execution in the security context of the user who Ctrl+clicks the link.
medium.com
Published on medium.com
Cybersecurity
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.
Context
Notepad has shipped with Windows for thirty years as a plain-text editor: no formatting engine, no parser, no meaningful attack surface. As the author puts it, it was "the digital equivalent of a rock". Microsoft later modernised it, adding Markdown support so that headers, bold text and clickable links render inside .md files. Part of that work involved parsing links and pre-loading their handlers before the file had finished rendering, and handing control off to arbitrary protocol handlers without validation.
That change produced CVE-2026-20841, a command injection flaw (CWE-77) in the Markdown link handler of the modern Notepad app. NVD scored it 8.8 on the CVSS v3.1 scale. It was fixed in Microsoft's February 2026 Patch Tuesday, following Microsoft's January 2026 promise of a year of "Real Fixes".
Setup
The report describes no accounts, roles, tooling or lab configuration. The only precondition it states is on the victim side: the modern Notepad app with Markdown support, and a user who opens a crafted .md file and Ctrl+clicks a link inside it. The fix ships in build 11.2510 or later.
Finding it
The author frames the issue as a threat-model mismatch rather than a single careless line. Notepad's implicit security model for three decades was that it cannot hurt you because it does nothing. When Markdown rendering, link handling and protocol dispatch were added on top, that assumption was not revisited: the icon, the name and the user's mental model of "harmless" stayed the same while the capabilities changed. The specific observation is that link handlers are parsed and pre-loaded before the file finishes rendering, and that links are forwarded to the operating system without proper checking of what they actually are.
Exploitation
Step 1: Craft a malicious Markdown file
The attacker creates a .md file containing a link that points to a non-HTTP(S) protocol handler instead of a normal web address. The report does not give a sample payload or name a specific handler.
Step 2: Deliver the file
Delivery is by email, chat, a shared drive, "wherever". Because it is "just a text file", nobody blinks.
Step 3: The victim opens it and clicks
The victim opens the file in Notepad, because why wouldn't they, and Ctrl+clicks the link.
Step 4: Notepad hands off to the OS
Notepad forwards the link to the operating system without properly checking what it is, and the registered handler runs: no warning, no second thought, no "are you sure". The result is arbitrary code execution in the security context of whoever clicked. It is not a sandboxed preview and not a warning dialog; it is a silent hand-off from "opening a text file" to "launching a program you never approved".
Root cause
The flaw is a command injection (CWE-77) in the Markdown link handler: a link is forwarded to the operating system without properly checking what it actually is. The design-level cause is that a feature was bolted onto a component that was trusted precisely because it did nothing interesting, and the threat model was never updated when Markdown rendering, link handling and protocol dispatch were added. The application was assumed harmless, so it received almost no scrutiny, and the hand-off produced no warning dialog or confirmation prompt. The report does not describe the code path itself.
Impact
An attacker who gets a crafted .md file in front of a user and persuades them to Ctrl+click a link achieves arbitrary code execution in that user's security context. The conditions are that the target runs an affected Notepad build and performs the click; the report describes no exploitation without user interaction. Microsoft stated there was no evidence of active exploitation in the wild at the time. The author's wider point is that the affected component ships by default and sits on every Windows machine in an environment.
Fix
Microsoft fixed the issue in the February 2026 Patch Tuesday. The concrete remediation given is to update Notepad to build 11.2510 or later, noting that it ships through the Microsoft Store rather than only through the normal cumulative update, so it must be checked separately. Alongside patching, the author recommends treating unsolicited .md files with the same suspicion as unsolicited .exe files, and adding "harmless-looking file types can still launch things" to user awareness training, since most people's mental model stops at Office macros and PDFs.
Variants to test
- Other protocol handlers in the same link path. Try link targets using schemes other than HTTP(S) in a Markdown file opened in Notepad. A positive result is the registered handler launching with no confirmation prompt.
- Other Markdown-rendering surfaces. Apply the same test to any editor or viewer that renders Markdown and makes links clickable. A positive result is a non-HTTP(S) scheme being dispatched to the OS without validation.
- Pre-render handler loading. Look for applications that parse and pre-load link handlers before content finishes rendering. A positive result is a handler being resolved or invoked before the user has finished viewing the document.
- Other "harmless" file types that gained features. Test formats historically treated as inert (plain text, logs, notes) that have since acquired rendering or link handling. A positive result is any path from opening the file to executing a registered handler.
What happened, in plain words
For about thirty years, Notepad was the most boring program on Windows. You opened it, you typed letters, you saved the file. That was it. The author of the write-up calls it "the digital equivalent of a rock", and that is a fair description: a rock does not do anything, so a rock cannot do anything dangerous. Security teams left Notepad alone for exactly that reason. If a program cannot do anything interesting, there is nothing in it to break.
Then Microsoft decided to make Notepad more modern. The new version can display Markdown files. Markdown is a simple way of writing text where a few symbols turn into formatting: a line starting with # becomes a heading, text wrapped in ** becomes bold, and something written in square brackets followed by a link in round brackets becomes a clickable link. It is the format used for readme files on code hosting sites and for notes in many apps. To make those links clickable, Notepad had to learn how to look at a link and pass it on to Windows so that Windows could open it.
That last part is where the trouble started. Somewhere in that new code, Notepad took a link out of a file and handed it to Windows without properly checking what kind of link it was. A link is not always a web address. Windows uses the same link syntax for many other things: opening your mail program, starting a chat app, launching a program that has registered itself to handle a particular kind of link. If a file can make Notepad hand over any link at all, then a file can make Windows start a program.
The flaw got the identifier CVE-2026-20841. A CVE is a public catalogue number for a known security bug, so that everyone in the world can talk about the same issue by the same name. The US National Vulnerability Database (NVD) gave it a severity score of 8.8 out of 10 on a scale called CVSS v3.1. That is a high score, the kind usually reserved for serious server software, not for a text editor. Microsoft fixed it in the February 2026 Patch Tuesday, the monthly day on which Microsoft releases security updates. The author notes, with some irritation, that Microsoft had promised a year of "Real Fixes" in January 2026, one month earlier.
This article walks through the same ground as the technical write-up, but from zero. Every term is explained the first time it appears, and every step is described in the order the original covers it.
The setup you need to picture
The report does not describe any accounts, tools or test lab. There is no server to configure and no special software to install. The only thing it describes is the situation on the victim's side:
- The person is running the modern Notepad app, the one with Markdown support. The fix ships in build 11.2510 or later, and a build number is simply the version of the program.
- The person opens a prepared
.mdfile and holds the Ctrl key while clicking a link inside it.
.md is the file extension for Markdown files, just as .txt is the extension for plain text. Ctrl+click is the usual way to follow a link in an editor: a single click just puts the cursor there, and holding Ctrl tells the program you want to open the link instead.
That is the whole precondition. No password, no account, no network access on the attacker's side is described.
How the problem was found
The author does not present this as one careless line of code. The framing is what security people call a threat-model mismatch. A threat model is simply the list of things you believe a system can and cannot do, and therefore what you need to defend against. Notepad's threat model for thirty years was: it cannot hurt you, because it does nothing. That belief was correct while Notepad only handled plain text.
When Markdown rendering, link handling and the dispatch of links to the operating system were added, that belief was never revisited. The icon stayed the same. The name stayed the same. The user's mental model, "it's just Notepad, it's harmless", stayed the same. Only the capabilities changed, and nobody updated the assumptions to match.
The specific technical observation in the report is twofold. First, link handlers are parsed and pre-loaded before the file has finished rendering. Parsing means reading the text and working out its structure; pre-loading means getting the handler ready in advance, before it is actually needed. Second, links are forwarded to the operating system without proper checking of what they actually are. Those two facts together are the bug.
Exploitation, step by step
Step 1: Craft a malicious Markdown file
The attacker creates a .md file containing a link that points to a non-HTTP(S) protocol handler instead of a normal web address.
A few terms here. A protocol handler, or URL scheme, is the part of a link before the colon: https in a web address, mailto for email, and so on. Windows lets installed programs register their own schemes, so that clicking a link of that kind starts that program. HTTP and HTTPS are the two schemes used for ordinary web pages. A non-HTTP(S) scheme is any other one, and that is the category the malicious link uses.
The report does not give a sample payload and does not name a specific handler. What matters for understanding is the shape of the trick: the file looks like text, but one of its links is aimed at something other than a website.
Why take this step? Because the whole attack depends on a file that looks harmless. A file full of plain-looking text with a link in it raises no alarm, and the attacker needs exactly that.
Step 2: Deliver the file
Delivery is by email, chat, a shared drive, "wherever". Because it is "just a text file", nobody blinks.
This is a social step rather than a technical one. The attacker does not need to break into anything; they need the file to reach a person. The reason it works is the same threat-model mismatch as before, now in the victim's head: a text file is assumed to be inert, so it gets less suspicion than an attachment ending in .exe.
Step 3: The victim opens it and clicks
The victim opens the file in Notepad, because why wouldn't they, and Ctrl+clicks the link.
This is the only moment where the victim has to do something. The report describes no way to trigger the flaw without that click. Opening the file alone is not described as enough; the Ctrl+click is what starts the chain.
Step 4: Notepad hands off to the operating system
Notepad forwards the link to the operating system without properly checking what it is, and the registered handler runs: no warning, no second thought, no "are you sure".
The result is arbitrary code execution in the security context of whoever clicked. Arbitrary code execution means the attacker's chosen program runs on the machine. Security context means it runs with the same permissions as the person who clicked: whatever that user is allowed to do, the launched program is allowed to do too. It is not a sandboxed preview, meaning it is not confined to a safe display area inside Notepad, and it is not a warning dialog. It is a silent hand-off from "opening a text file" to "launching a program you never approved".
Why does this matter so much? Because the user believes they only opened a document. The gap between what the user thinks happened and what actually happened is the whole danger.
The root cause
The flaw is classified as a command injection, CWE-77. CWE is a catalogue of weakness types, the way CVE is a catalogue of individual bugs, and CWE-77 is the entry for command injection. Command injection means that data which should be treated as inert content gets interpreted as an instruction to run something. In this case the link, which should just be a piece of text, is forwarded to the operating system without properly checking what it actually is. Validation here would mean checking the link against a list of allowed schemes before acting on it.
The design-level cause is the one described above: a feature was bolted onto a component that was trusted precisely because it did nothing interesting, and the threat model was never updated when Markdown rendering, link handling and protocol dispatch were added.
Why did nobody stop it? Because the application was assumed harmless and received almost no scrutiny. The application was assumed harmless, so it received almost no scrutiny, and the hand-off produced no warning dialog or confirmation prompt that a user could have refused.
What the impact is
An attacker who gets a crafted .md file in front of a user and persuades them to Ctrl+click a link achieves arbitrary code execution in that user's security context. Two conditions are needed: the target runs an affected Notepad build, and the target performs the click. The report describes no exploitation without user interaction.
Microsoft stated that there was no evidence of active exploitation in the wild at the time. "In the wild" means real attackers using it against real victims, as opposed to researchers demonstrating it. The author's wider point is that the affected component ships by default on every Windows machine in an environment. You do not have to install Notepad; it is already there, on every desk, which is what makes the gap significant.
The fix
Microsoft fixed the issue in the February 2026 Patch Tuesday. The concrete remediation given is to update Notepad to build 11.2510 or later. One detail matters: Notepad ships through the Microsoft Store rather than only through the normal cumulative update. A cumulative update is the monthly bundle of Windows fixes delivered by Windows Update. Because Notepad ships through the Store rather than only through the normal cumulative update, it has to be checked separately.
Alongside patching, the author recommends two habits:
- Treat unsolicited
.mdfiles with the same suspicion as unsolicited.exefiles. The rule is easy to follow once you know the risk exists. - In user awareness training, add "harmless-looking file types can still launch things" to the list. Most people's mental model stops at Office macros and PDFs, and this case shows why that stopping point is too early.
Variants worth testing
The technical write-up lists four directions for anyone who wants to look for similar problems elsewhere. Each one is a way of asking the same question: where else does a harmless-looking file get to start a program?
- Other protocol handlers in the same link path. Try link targets using schemes other than HTTP(S) in a Markdown file opened in Notepad. A positive result is the registered handler launching with no confirmation prompt. In plain words: swap the kind of link and see whether the same silent launch happens.
- Other Markdown-rendering surfaces. Apply the same test to any editor or viewer that renders Markdown and makes links clickable. A positive result is a non-HTTP(S) scheme being dispatched to the OS without validation. Many programs render Markdown, not just Notepad, so the same design mistake could exist in any of them.
- Pre-render handler loading. Look for applications that parse and pre-load link handlers before content finishes rendering. A positive result is a handler being resolved or invoked before the user has finished viewing the document. The point of interest is timing: work happening earlier than the user could possibly have asked for it.
- Other "harmless" file types that gained features. Test formats historically treated as inert, such as plain text, logs and notes, that have since acquired rendering or link handling. A positive result is any path from opening the file to executing a registered handler. The pattern to look for is a boring format that quietly learned new tricks.
The wider lesson
The author's closing argument is about feature bloat. A feature that seems nice to have gets added to something people already trust, and the trust does not get re-examined. The tool keeps its familiar name and icon while gaining the ability to hand control to other programs. That is how a text file becomes an execution path, and it is why "just a markdown file" should now make a defender pause in the same way as "just a PDF" or "just a spreadsheet macro".
The rock finally has a trigger. The advice is to pull it, meaning patch, before someone else does.
Glossary
- Markdown: a simple way of writing formatted text using plain characters, where symbols like
#and**become headings and bold text, and bracketed text becomes a link. .md: the file extension used for Markdown files.- Plain-text editor: a program that opens and saves files containing only characters, with no formatting.
- Attack surface: the total set of ways a program can be made to do something, and therefore the set of things an attacker could try.
- Parser: the part of a program that reads text and works out its structure.
- Protocol handler (URL scheme): the part of a link before the colon, such as
httpsormailto, which tells the system which program should open it. - HTTP and HTTPS: the schemes used for ordinary web pages.
- Non-HTTP(S) scheme: any link scheme other than HTTP or HTTPS, such as one registered by a mail client or another installed program.
- Dispatch: the act of passing a link to the operating system so that the right program is started.
- Validation: checking input against rules before acting on it, for example only allowing an approved list of schemes.
- Allow-list: a list of things that are permitted, with everything else refused.
- CVE: a public catalogue number for an individual known security bug, so that everyone can refer to the same issue by the same name.
- CWE: a catalogue of weakness types, used to classify what kind of mistake a bug is.
- CWE-77: the CWE entry for command injection.
- Command injection: a weakness where data that should be treated as inert content is instead interpreted as an instruction to run something.
- NVD: the US National Vulnerability Database, which records CVEs and their severity.
- CVSS v3.1: a standard scoring system for the severity of a vulnerability, from 0 to 10.
- 8.8: the CVSS v3.1 score NVD gave this issue, which is in the high range.
- Patch Tuesday: the monthly day on which Microsoft releases security updates.
- Cumulative update: the monthly bundle of Windows fixes delivered through Windows Update.
- Build (number): the version number of a program; a lower number means an older copy.
- 11.2510: the Notepad build in which the fix ships, according to the report.
- Microsoft Store: the app store built into Windows, through which Notepad updates are delivered.
- Threat model: the set of assumptions about what a system can do and therefore what must be defended against.
- Threat-model mismatch: a situation where a system's capabilities change but the assumptions about it do not.
- Pre-loading: getting something ready in advance, before it is actually needed.
- Rendering: turning marked-up text into the formatted result the user sees on screen.
- Ctrl+click: holding the Ctrl key while clicking, the usual way to follow a link inside an editor.
- Arbitrary code execution: the ability for an attacker to make a program of their choosing run on the machine.
- Security context: the set of permissions under which a program runs; here, those of the user who clicked.
- Sandboxed preview: a confined display area that cannot affect the rest of the system.
- Confirmation prompt: a dialog asking the user to approve an action before it happens.
- In the wild: happening against real victims, as opposed to being demonstrated by researchers.
- User interaction: something the victim has to do, such as clicking, for an attack to work.
- User awareness training: teaching people what risks to watch for.
- Office macro: a small script embedded in an Office document that can run when the document is opened, a long-standing delivery method for attacks.
- Feature bloat: the accumulation of extra features in a product, each one adding capability and risk.
- Variant testing: trying the same idea against other programs or formats to see whether the same mistake exists there.