Skip to content
DoS Advisory Beginner CVE-2022-23460

GHSL-2022-049: Stack exhaustion in jsonxx - CVE-2022-23460

A crafted JSON file causes stack exhaustion when parsed by the jsonxx library, leading to a crash. An attacker could use this to cause a denial of service in programs that use the library.

jarlob Follow

Originally disclosed on GitHub Security Lab

The attached repro.json file causes stack overflow in ASAN build of jsonxx when passed to Object::parse

jarlob, 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 JSON parser uses recursion without a depth limit, so deeply nested input exhausts the call stack.

Impact

This issue may lead to Denial of Service of the program using the library.

What the attacker needed

Attacker can supply a JSON file; program uses jsonxx to parse it

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.

A library that reads JSON data can be tricked by a specially crafted file into using too much memory on the stack, which is where the program keeps track of function calls. This makes the program crash, so anyone who can supply such a file can stop the program from working.

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 jarlob

View all

192 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.