Skip to content
Katabench
Try free

Snippet Expansion Bomb (Billion Laughs)

Medium About 35 min Katabench Pro

Meter nested template snippets as they expand, so a few self-multiplying snippets cannot exhaust memory or CPU before the size check runs.

The full brief is part of Katabench Pro

Pro opens this kata's brief, its starter code and its grader. To see how the track works first, try Block Private Hosts (SSRF), which is free.

How it is graded

Functional tests and adversarial payloads both have to pass before the solution is accepted.

C# secure coding exercises →

What it practices

Resource exhaustion
Bound sizes, expansions and regex backtracking so one request cannot exhaust the server.

Related katas