Notepad was supposed to be the safe harbor of Windows utilities. Then Microsoft added Markdown, and things got complicated.
Press enter or click to view image in full size
For nearly 30 years, notepad.exe was the gold standard of “dumb” utilities. It was a simple Win32-backed buffer for strings. It did exactly one thing: displayed text. Because of this simplicity, it was virtually impossible to exploit. If you opened a suspicious file in Notepad, you were safe. It didn’t parse macros, it didn’t run scripts, and it certainly didn’t make network connections.
But in early 2026, that changed.
With the discovery of CVE-2026–20841, a Remote Code Execution (RCE) vulnerability with a CVSS score of 7.8, the humble Notepad has officially entered the “feature bloat to vulnerability” pipeline.
Press enter or click to view image in full size
Here is a deep dive into what this vulnerability is, how a text editor became an attack vector, and whether you should actually panic.
To understand the bug, we have to understand the history. For decades, Windows had two text tools:
Microsoft recently deprecated and removed WordPad. To fill the void for developers and power users, they began injecting new features into the modern (Microsoft Store) version of Notepad. The biggest addition? Markdown support.
Markdown is a lightweight markup language that allows you to represent formatted text using unformatted text. For example, if you type # Hello in a Markdown editor, it renders as a large Hello header. It allows you to transport “Word-like” documents without the file size bloat of Word documents.
Crucially, Markdown supports hyperlinks. And this is where the trouble begins.
The vulnerability lies in how the modern Notepad application parses and handles Uniform Resource Identifiers (URIs) within Markdown (.md) files.
When Notepad transformed from a raw text viewer to a Markdown renderer, it had to decide how to handle links. A standard link looks like this: [Google](https://google.com).
However, the researchers found that Notepad failed to properly sanitize the file:// URI scheme.
An attacker can create a malicious Markdown file containing a link that points not to a website, but to a local executable or a network resource.
Press enter or click to view image in full size
As seen in the Proof of Concept (PoC) above, the attacker formats a link that points directly to cmd.exe.
When a user opens this .md file in Notepad, the application renders the text “POC” as a clickable link. If the user clicks it, Notepad passes that URI to the system. Because of the lack of sanitization, instead of opening a web browser, the system obeys the file:// protocol and executes the binary.
Press enter or click to view image in full size
If an attacker uses a network path (e.g., pointing to an SMB share), they could potentially trick the user into downloading a payload or leaking NTLM hashes just by clicking the link.
There is a lot of Fear, Uncertainty, and Doubt (FUD) circulating on Twitter and Reddit regarding this bug. Let’s look at the nuance.
Is this a critical “zero-click” exploit? No.
Join Medium for free to get updates from this writer.
For this exploit to work, a specific chain of events must occur:
Contrary to some early reports claiming “silent execution,” modern Windows protections do trigger.
Press enter or click to view image in full size
As shown above, Windows attempts to warn the user that file://C:/windows/system32/cmd.exe might be unsafe. However, we all know that “Warning Fatigue” is real. Users are conditioned to click “Yes” to get to the content they want.
If the user clicks “Yes,” the command executes with the privileges of the current user.
Press enter or click to view image in full size
While it requires user interaction, the risk is that this breaks the mental model of Notepad. Users treat text files as harmless. If an HR employee receives a Candidate_Notes.md file, they don’t expect it to be capable of launching a reverse shell.
This vulnerability highlights a massive problem in modern software development: Feature Bloat.
As mentioned in the analysis of this bug, we have reached the logical conclusion of adding features to things that didn’t need them.
By adding a Markdown parser, Microsoft increased the attack surface of the application. By integrating Copilot and AI features, they normalized the behavior of notepad.exe making network connections.
From a Blue Team/Defender perspective, this is a nightmare. Five years ago, if notepad.exe tried to talk to the internet or spawn a child process, your EDR would flag it immediately as malware. Today? That’s just Notepad logging into your Microsoft account for AI assistance.
Microsoft has released a patch for the Store-based version of Notepad.
Since we can’t stop vendors from adding features, we must limit what those applications can do.
This vulnerability is a perfect use case for Ring Fencing or Application Isolation policies (using tools like ThreatLocker, AppLocker, or generic Firewall rules).
CVE-2026–20841 isn’t the end of the world, but it is a wake-up call. It serves as a reminder that complexity is the enemy of security. When we demand that our simple text editors become comprehensive document rendering platforms, we inherit the vulnerabilities that come with that complexity.
Update your apps, warn your users about .md files, and maybe… just maybe… stick to the legacy notepad.exe if you just need to read a log file.