Map and gate unneeded attack surface in open source codebases

Anthropic researchers ran Claude over 25 open source projects and it found 493 cases of code reachable when it should not be, including about 4,500 lines of pre-auth ML-DSA code in OpenSSH.

Done withClaude· Oct 20, 2026 · 2 accounts

What they did

A team at Anthropic, writing under Chris Rohlf's name, pointed Claude at 25 open source projects in C, C++, Java, PHP and Python, more than five million lines in total. Rather than hunt for single bugs, Claude was asked to find code that an attacker can reach but a deployment does not need. It looked three ways: code live in the default configuration that no default feature uses, pairs of options that quietly cancel a security control, and complex code that runs before authentication or before a protocol state change. It built an inventory of over 17,000 configuration options, confirmed findings with dynamic traces and, for default configuration cases, wrote a gate and checked the project's own test suite still passed unchanged. The team later packaged the three passes as a reusable Claude skill.

How it went

Claude reported 493 issues. All 11 projects that expect logged-in users had code reachable before login, and 94 option combinations switched a security control off with no warning, one of them present for 21 years. The biggest cut was in OpenSSH 10.4: roughly 4,500 lines of experimental ML-DSA-44 parsing were reachable by an unauthenticated client even when the algorithm was disabled. The team sent patches, Claude then found two ways around the first fix, and the maintainers shipped a fuller change in 10.6 that removed about a fifth of the code reachable before authentication.

Worth knowing

This is the vendor reporting its own research, and the post does not name the harness Claude ran in. None of the findings was exploitable on its own; the gain is that unknown bugs get harder to reach. On Hacker News, several security users said Claude's safety filters block them from writing proofs of concept for their own fixes.

Try it

With Claude· 3 parts to fill in

Review [repository] for attack surface it does not need, in three separate passes. First, list code reachable in the default configuration that no default feature uses. Second, list complex or sensitive code that runs before [authentication or the relevant protocol stage]. Third, list combinations of configuration options that silently disable or weaken a security control. Confirm each finding by tracing the code path, not by reading names. For default configuration findings, propose a gate, apply it on a branch and run [the project's test command] against the baseline; keep a change only if every result is identical. Do not change anything that alters non-default behaviour; list those for me to decide. Stop and give me a report of findings and proposed patches.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related