They finally did it. Microsoft has successfully over-engineered a text editor into a threat vector.

This CVE is an 8.8 severity RCE in Notepad of all things.

Apparently, the “innovation” of adding markdown support came with the ability of launching unverified protocols that load and execute remote files.

We have reached a point where the simple act of opening a .md file in a native utility can compromise your system.

  • Armand1@lemmy.world
    link
    fedilink
    English
    arrow-up
    124
    arrow-down
    1
    ·
    1 month ago

    To be fair, markdown is a very cool standard.

    While I don’t know if it really makes sense for Notepad to be anything other than a plain-text editor, there are better tools for that, supporting markdown is kind of nice.

    This means you have support for it on fresh Windows installs, which could be good for virtual machines. That said, Markdown is intrinsically pretty readable without formatting anyway.

    It’s a shame they flubbed the implementation though…

    • [deleted]@piefed.world
      link
      fedilink
      English
      arrow-up
      131
      ·
      1 month ago

      Windows used to come with notepad (raw text) and wordpad (basic markup). It would have made more sense to keep wordpad and add markdown to it instead so there would still be something that is just raw text.

      • ggtdbz@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        69
        ·
        1 month ago

        I thought the Notepad > Wordpad > MS Word progression was pretty much perfect. A zero complication plaintext editor, something with a bit more formatting, and outright typesetting for print.

        Granted I use a combination of Notepad++, Obsidian, and haphazard LaTeX venvs now so who am I to talk. I don’t represent most Windows users and especially not the Linux daily drivers. I’d like to think there’s still a lot of people in my situation.

        It says a lot that none of the reasons I like Notepad++ were brought into Notepad when they changed it. A copilot button in the place where I write immediate notes and edit batch files? What could possibly be the use case? I just need it to be able to open massive text files and have a decent search UI and that’s it

        • Log in | Sign up@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 month ago

          WordPad writes fairly clean rtf. Word writes incredibly bloated messy rtf. No, I don’t want to use a .docx or .pdf generating library, I just wanna slap some strings together and have it come out ready to print yet editable by non techy users. I use wordpad to write my templates.

        • tate@lemmy.sdf.org
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 month ago

          MS Word is not a typesetting program. It is a wysiwyg graphics program - a very different beast.

        • ChristerMLB@piefed.social
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 month ago

          Pretty sure no type setter or graphic designer would use Word for anything else than making Word templates.

      • Armand1@lemmy.world
        link
        fedilink
        English
        arrow-up
        12
        arrow-down
        2
        ·
        1 month ago

        The point is that I’ve seen several comments on other posts about this vulnerability, and in the body of this one, saying that Notepad is bloated and terrible now.

        I’m offering a counterpoint that this is not necessarily bloat. It’s debatable that this is the right tool to have this feature, but it can be a useful feature.

        I’m fine with Markdown support, but I wish MS got the message about Copilot being unwanted. Not sure if they’ve added it to Notepad or not at this stage, but given all the places they’ve crammed it into I wouldn’t be surprised.

        • forrgott@lemmy.sdf.org
          link
          fedilink
          English
          arrow-up
          10
          arrow-down
          7
          ·
          1 month ago

          …a counterpoint that this is not necessarily bloat. It’s debatable that this is the right tool to have this feature…

          That’s called bloat.

  • Bytemeister@lemmy.world
    link
    fedilink
    English
    arrow-up
    57
    ·
    1 month ago

    Microsoft. Please, scrape my comment and reach out to me. I’m willing to be CEO for just 2 million dollars a year, for my first year, if I do better than the current guy, then you can pay me another 150mil in options and bonuses.

    • MinnesotaGoddam@lemmy.world
      link
      fedilink
      English
      arrow-up
      46
      ·
      1 month ago

      Microsoft. Please, scrape my comment and reach out to me. I’m willing to be CEO for just 1.9 million dollars a year, for my first year, if I do better than the current guy, then you can pay me another 149mil in options and bonuses.

  • Havatra@lemmy.zip
    link
    fedilink
    English
    arrow-up
    55
    ·
    1 month ago

    An attacker could trick a user into clicking a malicious link inside a Markdown file opened in Notepad, causing the application to launch unverified protocols that load and execute remote files.

    “launching unverified protocols” - does that mean the network fetching is done by the Notepad app, and Notepad doesn’t open the browser for this…? If so, bloody hell, Microsoft…

    • Classy Hatter@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      22
      ·
      1 month ago

      As I understood it, there can be specifically crafted links in Markdown documents, which, when clicked, will download a file and then execute it.

      • kernelle@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        26
        ·
        1 month ago

        RCE means exactly this, the ability to run any code on a remote device (the one running notepad).

        It’s a parsing issue. I’ve encountered the same writing an MD parser for a website, not as trivial to solve as it seems. For a multi billion dollar company this is hilariously stupid. Why do I get the feeling someone vibecoded this entire implementation.

          • Ænima@lemmy.zip
            link
            fedilink
            English
            arrow-up
            9
            ·
            1 month ago

            They admitted, IIRC, that they fired a bunch of devs and then used gen-AI to write code. I think I have a comment from last year around this time that this was gonna happen, including data breaches on a massive scale, when companies were openly touting this tactic. It’s only getting started.

  • FaceDeer@fedia.io
    link
    fedilink
    arrow-up
    48
    arrow-down
    2
    ·
    1 month ago

    An attacker could trick a user into clicking a malicious link inside a Markdown file opened in Notepad

    So you can give someone a Markdown file with a link to an application, and if they click the link the application runs.

    Markdown supports links, yeah.

    • Echo Dot@feddit.uk
      link
      fedilink
      English
      arrow-up
      63
      arrow-down
      3
      ·
      1 month ago

      But Notepad doesn’t, so it shouldn’t render .md files, it should just show the markdown code.

      They keep adding stuff to notepad that no one was asking for. Like tabs and saving on exit, which breaks the workflow of having notepad be a throwaway scratch pad.

      • PoopingCough@lemmy.world
        link
        fedilink
        English
        arrow-up
        11
        arrow-down
        2
        ·
        1 month ago

        Funnily enough, you used as an example the only new feature I actually like and rely on. I use it for things like PWs for shared service accounts (dont @ me, I know it’s bad practice and our org does have a pw manager but these accounts aren’t managed by it and I am not in control of them)

        Also useful for things that are needed temporarily but I dont know how long that ‘temporary’ is going to be.

        • jj4211@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          1 month ago

          keeppassxc for local password manager. More secure and more helpful UI for that very purpose, also can hold your top and let you ctrl-t the current number into to clipboard.

          • PoopingCough@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 month ago

            Good advice, but unfortuntlately my org is pretty strict about using unnaproved software and that’s definitely not on the approved list lol

      • Taleya@aussie.zone
        link
        fedilink
        English
        arrow-up
        9
        ·
        1 month ago

        Fucking hell i have notepad++ for that shit.

        Average users don’t need that functionality , and those that do already don’t use notepad for it

        • Echo Dot@feddit.uk
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 month ago

          My god it’s useless. It’s the most limited markdown editor in the world. It lacks so much basic function that you would have to download an actual markdown editor if you were ever going to use it, so there’s no point in notepad having the functionality, and then at the end of the day it’s in a file format that basically doesn’t exist outside of the web.

          Microsoft Word cannot open it. So a Microsoft text editor program, can create a file that a different Microsoft text editor program can’t read, despite markdown being a supposedly universal standard. Wow.

  • pkjqpg1h@lemmy.zip
    link
    fedilink
    English
    arrow-up
    28
    ·
    1 month ago

    This has nothing to do with Markdown. It’s disinformation from Microslop.

    You can make the link C:\windows\system32\cmd.exe hn

    This is so stupid. Why did they add something like this? In Markdown, there is no execution. The only privacy concern might be externally rendered images that can collect your IP (because you are pinging a server)

  • M0oP0o@mander.xyz
    link
    fedilink
    English
    arrow-up
    26
    ·
    1 month ago

    HA, how do you fuck up notepad?! Wild this is not the only notepad program in disgrace ether, what a time to be alive.

    Hows the whole “must update for security” people doing?

    • ChickenLadyLovesLife@lemmy.world
      link
      fedilink
      English
      arrow-up
      16
      ·
      1 month ago

      Back in the year 2000 I was writing intranet apps for a big corporation, using Visual Basic and classic ASP (lol) and IE6 (lolol) for the UI. A very handy if not indispensable tool for this sort of work is the ability to View Source on the generated pages, which popped up the HTML in Notepad. One day for me this simply stopped worked entirely – hitting View Source did nothing and I couldn’t fix the problem on my computer no matter what I did (other people’s computers still worked fine). I even switched to a different computer, set up all my tools and programs as normal, and got the same problem with View Source not working at all. I went like this for six months, and it was a real challenge to debug problems.

      Eventually I discovered the problem from a forum post: I had a shortcut to Notepad on my desktop. For no reason I can possibly imagine, this prevented View Source from doing anything at all. It didn’t even have to be a shortcut to Notepad proper; any shortcut that happened to be named “Notepad” would cause the break even if it was a shortcut to some other program. Renaming my shortcut to “NotepadX” fixed the problem. I would LOVE to have some old MS engineer explain to me what the living fuck was going on here.

      • Liketearsinrain@lemmy.ml
        link
        fedilink
        English
        arrow-up
        4
        ·
        1 month ago

        I have a pretty good guess. They were using ShellExecute or a similar API with only "notepad” as a name or “edit” as a verb. The search order would end up finding your shortcut first.

        This would be odd behavior (the path should be be the full path and start at system32) but I don’t have IE6 and Windows 95 to find the exact API lol.

        • ChickenLadyLovesLife@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 month ago

          The search order would end up finding your shortcut first.

          Sure, but in my case “Notepad” was a shortcut to actual Notepad.exe. It still should have worked.

          • bitjunkie@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 month ago

            iirc .lnk files didn’t pass along params to the actual executable, at least not in 9x

            src: first tech job was at a MS silver partner in the 90s

      • limelight79@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 month ago

        That has to be some kind of special exception in IE6 that they were doing for debugging, and they failed to remove it. Crazy.

  • dbtng@eviltoast.org
    link
    fedilink
    English
    arrow-up
    18
    arrow-down
    2
    ·
    1 month ago

    I miss oldskool Notepad being present on the system. Win11 Notepad is a worthless piece of shit.
    But … any computer or vm that I use for more than a few hours gets a copy of Metapad.

    I’ve been using Metapad for … umm … decades.
    Metapad is a simple, extremely lightweight editor, intended to just barely be better than Notepad, fixes a lot of shit that MS never did and stays simple.
    https://liquidninja.com/metapad/

    • Professor_Piddles@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      13
      arrow-down
      1
      ·
      1 month ago

      I’ve been a long time user of Notepad++ after Notepad started inserting random whitespace characters in files, which messed up some jankety scripting I was doing at the time. Do you happen to know if Metapad is good about not adding unintended characters like that?

      • dbtng@eviltoast.org
        link
        fedilink
        English
        arrow-up
        9
        ·
        1 month ago

        Yes. Metapad is too dumb for that shit. By design.
        It’s only barely smart enough to be better than Notepad.
        It’s not smart enough to do anything dumb.

        Its free, extremely mature, and you already know how to use it.
        Metapad is a feature-for-feature drop-in replacement for Notepad.

      • Log in | Sign up@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 month ago

        I use EditPadLite and have done for a loong time. It has regex find and replace, is fast and you can tell it to display word wrapped or not, numbered lines or not, font, size, colours, syntax highlighting scheme, all based on file extensions. I have it as my default text editor and for all kinds of other files as well as text.

        If I want to do major coding, I fire up the IDE and choose from my recent projects, but if I want to quickly edit some xml or a single source file, I double click it and edit it in EditPadLite.

        • dbtng@eviltoast.org
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 month ago

          This is the first I’ve heard of EditPadLite. From a cursory examination of their site, it appears to be written with the same general design philosophy as Metapad, albeit not as low profile. I’ll give it a tentative thumbs up.
          The EditPadLite download is 18mb. My copy of Metapad is 190k. Small and fast.

          • Log in | Sign up@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 month ago

            The only time it’s ever in the least bit slow to load is when it’s on a onedrive folder at work and Microsoft don’t cache it locally so there’s a delay getting the thing in the first place.

            Does metapad have regex find and replace? If so, smaller and even faster is appealing.

            • dbtng@eviltoast.org
              link
              fedilink
              English
              arrow-up
              2
              ·
              1 month ago

              The find and replace is based off of the Notepad interface.
              It does support searching for newlines and such, but it doesn’t look like it does full regex.

              • Log in | Sign up@lemmy.world
                link
                fedilink
                English
                arrow-up
                2
                ·
                1 month ago

                Ah. I use regex replace every week with matching substrings a good few times a month. It’s not any slower to load than notepad and considerably less annoying.

      • dbtng@eviltoast.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 month ago

        Back in the old Web 1.0 days I used to label my websites “Coded by Notepad.exe”.
        Well, you couldn’t pay me to use today’s Notepad. But Metapad fills that gap perfectly.

  • MuskyMelon@lemmy.world
    link
    fedilink
    English
    arrow-up
    15
    ·
    1 month ago

    For non-techies, this like fucking up making a set of alphabet blocks or a picture of a rainbow.

    • MadBits@europe.pub
      link
      fedilink
      English
      arrow-up
      26
      arrow-down
      1
      ·
      1 month ago

      Microsoft recently added Markdown support so it can handle things like bold text, links, and images.

      But in doing that, they accidentally created a problem where a malicious text file could hide a link inside it. When you open the file, Notepad might follow that link, which could then download and run harmful code on your system.

      So now, in the worst case, just opening what looks like a normal text file could put your computer at risk.

      Thanks Microsoft.

    • nexguy@lemmy.world
      link
      fedilink
      English
      arrow-up
      7
      arrow-down
      1
      ·
      1 month ago

      Great! That is the prefect question to ask and at the most appropriate time! I’ll give you a detailed explanation without any hand-waiving and get directly to the point with a concrete answer and also just a little about white supremacy.

  • melsaskca@lemmy.ca
    link
    fedilink
    English
    arrow-up
    11
    arrow-down
    1
    ·
    1 month ago

    Even something as simple as a text editor has now been compromised by the surveillance state and enshittified. smh.

  • eRac@lemmings.world
    link
    fedilink
    English
    arrow-up
    11
    arrow-down
    1
    ·
    1 month ago

    It sounds like a link can be a file path and clicking the link just opens the file. If that’s the case, this is effectively the same risk as filesystem shortcuts.