Skip to content
DoS Advisory Intermediate CVE-2023-37463

GHSL-2023-117_GHSL-2023-119: Denial of Service (DoS) in cmark-gfm - CVE-2023-37463

Three crafted markdown documents can trigger quadratic-time algorithms in cmark-gfm, causing excessive CPU use. An attacker could use this for denial-of-service against sites that render untrusted markdown.

kevinbackhouse Follow

Originally disclosed on GitHub Security Lab

A crafted markdown document can trigger a quadratic complexity algorithm in cmark-gfm.

kevinbackhouse, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, the parser and renderer contain loops that repeatedly scan linked lists or expand table rows, so work grows quadratically with input size.

Impact

This issue could be used in a denial-of-service attack on websites that use cmark-gfm to render markdown documents.

What the attacker needed

Ability to submit markdown to a service using cmark-gfm

The fix

The issues were fixed in version 0.29.0.gfm.12.

How it was found

  1. Create a markdown table with a very large number of columns.
  2. Render it with cmark-gfm using the table extension.
  3. Observe that running time increases quadratically as the column count grows.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

cmark-gfm is a tool that turns markdown text into HTML. Some inputs make it do work that grows much faster than the input size, so a small file can keep a server busy for a long time. That can stop the site from serving other users.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by kevinbackhouse

View all

47 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.