The minimal reproducer

The bug is not the ten thousand lines of code that led to it. The discipline of reduction teaches you things about the bug that you could not have learned any other way.


There is a piece of work in security research that is unglamorous and almost universally skipped: reducing the reproduction case to its minimum. The initial reproduction is usually large — a complete application, a full test harness, a sequence of operations that produces the crash or the unexpected behaviour. The minimal reproducer is the smallest possible thing that still demonstrates the issue. Getting from one to the other is laborious. It is also one of the most instructive things you can do with a finding.

The reduction process works by systematic elimination. Start with what you have. Remove the least important-looking component. Does the issue still reproduce? If yes, that component was not necessary — keep it out. If no, it was necessary — put it back and try something else. This continues until removing anything causes the issue to disappear. What remains is the minimal case.

What the process teaches you

The act of reduction answers questions that static analysis alone cannot. When you discover that removing a particular step in the sequence causes the issue to disappear, you have learned something about the conditions required to trigger it. When you discover that two apparently unrelated components are both necessary, you have found a dependency that was not visible in the code. The minimal reproducer is not just a convenience for the receiving engineer — it is a research instrument.

I have reached the minimal reproducer for a finding and realised, at that stage, that the issue was less severe than I thought — because what looked like a straightforward path to the vulnerability turned out to require a precondition that significantly limits who can trigger it. I have also reached the minimal reproducer and realised the issue was more interesting than the original observation suggested — because reduction revealed that the triggering condition was simpler and more broadly applicable than the original case implied.

The minimal reproducer is the finding. Everything else is context.

Why it matters for the receiving engineer

A security engineer receiving a report needs to reproduce the issue, understand it, route it to the right team, and eventually verify the fix. A minimal reproducer reduces the time required for all of these steps. It removes ambiguity about which component is affected. It makes verification of the fix straightforward: apply the fix, run the reproducer, observe whether the issue persists.

A report that includes a ten-thousand-line application as its reproduction case puts the work of reduction onto the receiving team. They may not have the context to do it efficiently. They may reach a different minimal case than you would have and reach different conclusions. Doing the reduction yourself produces a better report and a more accurate conversation about the finding.

The honesty of minimisation

There is one more thing the minimisation process produces: honesty. If you cannot produce a minimal reproducer — if every attempt to reduce the case causes the issue to disappear — then you do not yet understand the conditions under which the issue occurs. That is useful information. It means the finding is not ready to report. Continue investigating. When you understand the issue well enough to reduce it, you will understand it well enough to report it accurately.

The minimal reproducer is the researcher asking themselves: what is the simplest true thing I can say about this? The answer to that question, in code, is the foundation everything else stands on.