Skip to content

A self-hosted DeepSeek security audit

Just completed a security audit of self-hosted DeepSeek v4.

The first thing to check for with these things, when you do them, is to make sure the jinja templates that power your instance don't execute arbitrary code, or call home. This is done in your Jinja templates that shape every chat response.

There's nothing weird or even all that interesting in the DeepSeek v4 Jinja templates.
No arbitrary code execution to speak of.

Code generation went much the same way.

25 medium sized apps in 8 major programming languages.
Around a million lines of code.

All had quality issues on the initial draft, but quality isn't what we were testing for.

None of the apps cleanly adhered to security best practices, which is to be expected without specialized prompting for _any_ open weights model.

Using multiple agents including Claude Opus 5.5 and GPT Astra 6.1 for the verification, we were unable to find evidence of malware generated by DeepSeek V4.

Instances of DeepSeek that are hosted by DeepSeek themselves do interact with Chinese servers and may behave differently.

But if the US government has evidence that self hosted DeepSeek agents are dangerous, they need to share this information with the public, because hard independent assessment does not produce results that support that assertion.