Every CVE Search/ Get API key

CVE-2026-44896

Mistune: XSS via unescaped figclass/figwidth in Figure directive

5.3 MediumFix available

Mistune is a Python Markdown parser with renderers and plugins. In 3.2.0 and earlier, in src/mistune/directives/image.py, the render_figure() function concatenates figclass and figwidth options directly into HTML attributes without escaping. This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used, because these values bypass the inline renderer. Version 3.2.1 contains a patch.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Passive

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
None

Exploit likelihood

0.20%Up 0.2 points since May 27, 2026
90%50%10%1%

What each source reports

CVE List Score used 5.3

Mistune: XSS via unescaped figclass/figwidth in Figure directive

Mistune is a Python Markdown parser with renderers and plugins. In 3.2.0 and earlier, in src/mistune/directives/image.py, the render_figure() function concatenates figclass and figwidth options directly into HTML attributes without escaping. This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used, because these values bypass the inline renderer. Version 3.2.1 contains a patch.

Record
CVE-2026-44896
CVSS 4.0
5.3 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Weakness
CWE-79
Updated
2026-11-02
EUVDEUVD-2026-31991 5.3

Mistune is a Python Markdown parser with renderers and plugins. In 3.2.0 and earlier, in src/mistune/directives/image.py, the render_figure() function concatenates figclass and figwidth options directly into HTML attributes without escaping. This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used, because these values bypass the inline renderer. Version 3.2.1 contains a patch.

Record
EUVD-2026-31991
CVSS 4.0
5.3 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-58cw-g322-p94v 5.3

Mistune has XSS via unescaped figclass/figwidth in Figure directive

In src/mistune/directives/image.py, the render_figure() function concatenates figclass and figwidth options directly into HTML attributes without escaping (lines 152-168).

This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used, because these values bypass the inline renderer.

Other attributes in the same file (src, alt, style) are properly escaped; figclass/figwidth were missed.

Record
GHSA-58cw-g322-p94v
CVSS 4.0
5.3 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
NVD 5.3

Mistune is a Python Markdown parser with renderers and plugins. In 3.2.0 and earlier, in src/mistune/directives/image.py, the render_figure() function concatenates figclass and figwidth options directly into HTML attributes without escaping. This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used, because these values bypass the inline renderer. Version 3.2.1 contains a patch.

Record
CVE-2026-44896
CVSS 4.0
5.3 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
OSV 5.3

Mistune: XSS via unescaped figclass/figwidth in Figure directive

Mistune is a Python Markdown parser with renderers and plugins. In 3.2.0 and earlier, in src/mistune/directives/image.py, the render_figure() function concatenates figclass and figwidth options directly into HTML attributes without escaping. This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used, because these values bypass the inline renderer. Version 3.2.1 contains a patch.

Record
CVE-2026-44896
CVSS 4.0
5.3 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Weakness
CWE-79
Updated
2026-11-02
OSVDEBIAN-CVE-2026-44896 6.1

Mistune is a Python Markdown parser with renderers and plugins. In 3.2.0 and earlier, in src/mistune/directives/image.py, the render_figure() function concatenates figclass and figwidth options directly into HTML attributes without escaping. This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used, because these values bypass the inline renderer. Version 3.2.1 contains a patch.

Record
DEBIAN-CVE-2026-44896
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
Show 8 moreShow less
OSVGHSA-58cw-g322-p94v 5.3

Mistune has XSS via unescaped figclass/figwidth in Figure directive

In src/mistune/directives/image.py, the render_figure() function concatenates figclass and figwidth options directly into HTML attributes without escaping (lines 152-168).

This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used, because these values bypass the inline renderer.

Other attributes in the same file (src, alt, style) are properly escaped; figclass/figwidth were missed.

Record
GHSA-58cw-g322-p94v
CVSS 4.0
5.3 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
OSVPYSEC-2026-168 6.1

Mistune is a Python Markdown parser with renderers and plugins. In 3.2.0 and realier, in src/mistune/directives/image.py, the render_figure() function concatenates figclass and figwidth options directly into HTML attributes without escaping. This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used, because these values bypass the inline renderer.

Record
PYSEC-2026-168
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVUBUNTU-CVE-2026-44896 5.3

Mistune is a Python Markdown parser with renderers and plugins. In 3.2.0 and earlier, in src/mistune/directives/image.py, the render_figure() function concatenates figclass and figwidth options directly into HTML attributes without escaping. This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used, because these values bypass the inline renderer. Version 3.2.1 contains a patch.

Record
UBUNTU-CVE-2026-44896
CVSS 4.0
5.3 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVAZL-88394 No score

CVE-2026-44896 affecting package python-mistune for versions less than 3.2.1-1

Mistune is a Python Markdown parser with renderers and plugins. In 3.2.0 and earlier, in src/mistune/directives/image.py, the render_figure() function concatenates figclass and figwidth options directly into HTML attributes without escaping. This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used, because these values bypass the inline renderer. Version 3.2.1 contains a patch.

Record
AZL-88394
Updated
2026-11-02
OSVopenSUSE-SU-2026:20827-1 No score

Security update for python-mistune

This update for python-mistune fixes the following issues

  • CVE-2026-33079: ReDoS in LINK_TITLE_RE can lead to denial of service via a crafted Markdown (bsc#1264347).
  • CVE-2026-33441: processing of malformed reference links can lead to excessive resource consumption and denial of service (bsc#1264752).
  • CVE-2026-44708: improper HTML escaping in the math plugin can lead to XSS (bsc#1264751).
  • CVE-2026-44896: improper escaping in render_figure can lead to attribute injection and XSS (bsc#1264754).
  • CVE-2026-44897: improper sanitization of user-controlled input in HTMLRenderer.heading can lead to XSS (bsc#1264750).
  • CVE-2026-44898: improper sanitization of user-supplied HTML input in render_toc_ul can lead to XSS (bsc#1265052).
  • CVE-2026-44899: improper input verification in Image directive plugin and improper escaping in render_block_image can lead to CSS injection (bsc#1265053).
Record
openSUSE-SU-2026:20827-1
Updated
2026-11-02
OSVopenSUSE-SU-2026:21339-1 No score

Security update for python-mistune

This update for python-mistune fixes the following issues

  • CVE-2026-59922: quadratic-time parsing on long runs of some markers in formatting.py can lead to DoS (bsc#1271117).
  • CVE-2026-59923: HTMLRenderer.safe_url() does not block percent-encoded javascript URIs and allows for XSS (bsc#1271119).
  • CVE-2026-59924: improper processing of user-supplied include paths in Include.parse() can lead to path traversal and arbitrary file reads (bsc#1271121).
  • CVE-2026-59925: quadratic-time parsing on long runs of some emphasis pairs in inline_parser can lead to DoS (bsc#1271125).
  • CVE-2026-59926: improper escaping in render_admonition() can lead to atribute injection and XSS (bsc#1271127).
  • CVE-2026-59927: uncontrolled recursion when processing two markdown files that include each other can lead to a DoS (bsc#1271128).
  • CVE-2026-59928: quadratic-time parsing on long lists of repeated reference-link definitions in block_parser can lead to DoS (bsc#1271131).
  • CVE-2026-59929: HARMFUL_PROTOCOLS list misses legacy and chained schemes and allow arbitrary script execution in user agents (bsc#1271132).
  • CVE-2026-59930: the toc plugin and TableOfContents directive generate heading IDs with predictable values and allow for collisions with attacker-controlled id="toc_N" content (bsc#1271082).
Record
openSUSE-SU-2026:21339-1
Updated
2026-11-02
OSVSUSE-SU-2026:21858-1 No score

Security update for python-mistune

This update for python-mistune fixes the following issues

  • CVE-2026-33079: ReDoS in LINK_TITLE_RE can lead to denial of service via a crafted Markdown (bsc#1264347).
  • CVE-2026-33441: processing of malformed reference links can lead to excessive resource consumption and denial of service (bsc#1264752).
  • CVE-2026-44708: improper HTML escaping in the math plugin can lead to XSS (bsc#1264751).
  • CVE-2026-44896: improper escaping in render_figure can lead to attribute injection and XSS (bsc#1264754).
  • CVE-2026-44897: improper sanitization of user-controlled input in HTMLRenderer.heading can lead to XSS (bsc#1264750).
  • CVE-2026-44898: improper sanitization of user-supplied HTML input in render_toc_ul can lead to XSS (bsc#1265052).
  • CVE-2026-44899: improper input verification in Image directive plugin and improper escaping in render_block_image can lead to CSS injection (bsc#1265053).
Record
SUSE-SU-2026:21858-1
Updated
2026-11-02
OSVSUSE-SU-2026:22655-1 No score

Security update for python-mistune

This update for python-mistune fixes the following issues

  • CVE-2026-59922: quadratic-time parsing on long runs of some markers in formatting.py can lead to DoS (bsc#1271117).
  • CVE-2026-59923: HTMLRenderer.safe_url() does not block percent-encoded javascript URIs and allows for XSS (bsc#1271119).
  • CVE-2026-59924: improper processing of user-supplied include paths in Include.parse() can lead to path traversal and arbitrary file reads (bsc#1271121).
  • CVE-2026-59925: quadratic-time parsing on long runs of some emphasis pairs in inline_parser can lead to DoS (bsc#1271125).
  • CVE-2026-59926: improper escaping in render_admonition() can lead to atribute injection and XSS (bsc#1271127).
  • CVE-2026-59927: uncontrolled recursion when processing two markdown files that include each other can lead to a DoS (bsc#1271128).
  • CVE-2026-59928: quadratic-time parsing on long lists of repeated reference-link definitions in block_parser can lead to DoS (bsc#1271131).
  • CVE-2026-59929: HARMFUL_PROTOCOLS list misses legacy and chained schemes and allow arbitrary script execution in user agents (bsc#1271132).
  • CVE-2026-59930: the toc plugin and TableOfContents directive generate heading IDs with predictable values and allow for collisions with attacker-controlled id="toc_N" content (bsc#1271082).
Record
SUSE-SU-2026:22655-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
mistune
PyPI
through 3.2.0
3.2.1
python-mistune
Azure Linux:3
before 3.2.1-1
3.2.1-1
mistune
Debian:12
All versions, plus listed versions
2.0.4-12.0.4-23.0.2-13.0.2-23.1.3-13.1.4-13.3.4-1
None known
mistune
Debian:13
All versions, plus listed versions
3.1.3-13.1.4-13.3.4-1
None known
mistune
Debian:14
All versions, plus listed versions
3.1.3-13.1.4-13.3.4-1
None known
mistune
PyPI
before 3.2.1, plus listed versions
0.1.00.2.00.3.00.3.10.4
Show 45 moreShow less
0.4.10.50.5.10.60.70.7.10.7.20.7.30.7.40.80.8.10.8.20.8.30.8.42.0.02.0.0a12.0.0a22.0.0a32.0.0a42.0.0a52.0.0a62.0.0rc12.0.12.0.22.0.32.0.42.0.52.1.03.0.03.0.0a13.0.0a23.0.0a33.0.0rc13.0.0rc23.0.0rc33.0.0rc43.0.0rc53.0.13.0.23.1.03.1.13.1.23.1.33.1.43.2.0
3.2.1
mistune
PyPI
before 3.2.1, plus listed versions
0.1.00.2.00.3.00.3.10.4
Show 44 moreShow less
0.4.10.50.5.10.60.70.7.10.7.20.7.30.7.40.80.8.10.8.20.8.30.8.42.0.02.0.0a12.0.0a22.0.0a32.0.0a42.0.0a52.0.0a62.0.0rc12.0.12.0.22.0.32.0.42.0.53.0.03.0.0a13.0.0a23.0.0a33.0.0rc13.0.0rc23.0.0rc33.0.0rc43.0.0rc53.0.13.0.23.1.03.1.13.1.23.1.33.1.43.2.0
3.2.1
python-mistune
SUSE:Linux Enterprise Server 16.0
From an advisory covering 10 CVEs
before 3.1.3-160000.5.1
3.1.3-160000.5.1
python-mistune
SUSE:Linux Enterprise Server for SAP applications 16.0
From an advisory covering 10 CVEs
before 3.1.3-160000.5.1
3.1.3-160000.5.1
mistune
Ubuntu:16.04:LTS
All versions, plus listed versions
0.6-20.7.1-1
None known
Show 13 moreShow less
Affected packages
PackageAffectedFixed
mistune
Ubuntu:18.04:LTS
All versions, plus listed versions
0.7.4-10.8-10.8.1-10.8.3-2
None known
mistune
Ubuntu:20.04:LTS
All versions, plus listed versions
0.8.4-10.8.4-2
None known
mistune
Ubuntu:22.04:LTS
All versions, plus listed versions
0.8.4-40.8.4-52.0.0-1+really0.8.4-1
None known
mistune0
Ubuntu:22.04:LTS
All versions, plus listed versions
0.8.4-10.8.4-2
None known
mistune
Ubuntu:24.04:LTS
All versions, plus listed versions
2.0.4-23.0.2-1
None known
mistune0
Ubuntu:24.04:LTS
All versions, plus listed versions
0.8.4-2
None known
mistune
Ubuntu:25.10
All versions, plus listed versions
3.0.2-23.1.3-1
None known
mistune0
Ubuntu:25.10
All versions, plus listed versions
0.8.4-4
None known
mistune
Ubuntu:26.10
All versions, plus listed versions
3.1.4-1
None known
mistune0
Ubuntu:26.10
All versions, plus listed versions
0.8.4-6
None known
mistune
Ubuntu:26.04:LTS
All versions, plus listed versions
3.1.3-13.1.4-1
None known
mistune0
Ubuntu:26.04:LTS
All versions, plus listed versions
0.8.4-40.8.4-50.8.4-6
None known
python-mistune
openSUSE:Leap 16.0
From an advisory covering 10 CVEs
before 3.1.3-160000.5.1
3.1.3-160000.5.1

History

History
RecordedChangedSources
affected, facts
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-44896 is a medium vulnerability (CVSS 5.3) in Lepture Mistune, published May 8, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.20%, the 9th percentile. Fixed in mistune 3.2.1.

References

Show 38 moreShow less
MoveEnter Open