CVE-2026-40890: github.com/gomarkdown/markdown: Out-of-bounds Read in SmartypantsRenderer

Published Apr 14, 2026
·
Updated

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

Other sources

github.com/gomarkdown/markdown: Out-of-bounds Read in SmartypantsRenderer

— Microsoft

The package github.com/gomarkdown/markdown is a Go library for parsing Markdown text and rendering as HTML. 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. This vulnerability is fixed with commit 759bbc3e32073c3bc4e25969c132fc520eda2778.

— IBM

The package github.com/gomarkdown/markdown is a Go library for parsing Markdown text and rendering as HTML. 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. This vulnerability is fixed with commit 759bbc3e32073c3bc4e25969c132fc520eda2778.

— MITRE

Affected Software

5 affected componentsFixes available
go/github.com/gomarkdown/markdown<0.0.0-20260411013819-759bbc3e3207
0.0.0-20260411013819-759bbc3e3207
Microsoft cbl2 cri-o 1.22.3-20
gomarkdown Markdown Go<2026-04-10
Microsoft cbl2 cri-o 1.22.3-20<1.22.3-21
1.22.3-21
IBM Concert Software<=1.0-3.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/gomarkdown/markdown to a version that resolves this vulnerability.

    Fixed in 0.0.0-20260411013819-759bbc3e3207
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.22.3-21
  3. Upgrade

    Upgrade github.com/gomarkdown/markdown to a version that resolves this vulnerability.

    Patch 759bbc3e32073c3bc4e25969c132fc520eda2778

Event History

Apr 14, 2026
Advisory Published
via GitHub·10:38 PM
Data Sourced
via GitHub·10:38 PM
DescriptionSeverityWeaknessAffected Software
Apr 21, 2026
CVE Published
via MITRE·07:51 PM
Data Sourced
via MITRE·07:51 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 PM
RemedyDescriptionSeverityWeaknessAffected Software
Apr 23, 2026
Data Sourced
via Microsoft·08:04 AM
DescriptionSeverityWeaknessAffected Software
Oct 14, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2026-40890?

CVE-2026-40890 is classified as a high severity vulnerability due to the potential for Out-of-bounds read leading to application panics.

2

How do I fix CVE-2026-40890?

To fix CVE-2026-40890, you should upgrade to the version 0.0.0-20260411013819-759bbc3e3207 of the gomarkdown/markdown package.

3

What types of systems are affected by CVE-2026-40890?

CVE-2026-40890 affects systems using specific versions of the gomarkdown/markdown package and others that utilize it in their implementations.

4

What kind of input triggers the vulnerability in CVE-2026-40890?

The vulnerability in CVE-2026-40890 is triggered by processing malformed input that contains a '<' character not followed by a '>' character.

5

Is there any workaround for CVE-2026-40890 until a fix is applied?

Until a fix is applied for CVE-2026-40890, avoid processing potentially malicious input to mitigate the risk of exploitation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203