Uncovering Deepseek AI’s Hidden Flaw: A Dive Into Its Response
The AI's response filter blocks answers about politics or the Chinese government by replacing them with a refusal message. An attacker could bypass this filter by asking the model to encode its answer in Base64, allowing the unfiltered response to be retrieved.
Hello friends, This will be a quick and short writeup on a simple vulnerability I found on deepseek AI.
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the response filter inspects the plain text of the model's output and does not decode or account for encoded formats such as Base64.
Impact
The AI's content filter could be bypassed, allowing users to obtain answers on restricted topics.
What the attacker needed
Access to Deepseek AI
The fix
The filter should be improved to detect and block encoded responses, or the model should be prevented from encoding restricted content.
How it was found
- Ask the AI a question about politics or the Chinese government.
- Add an instruction to encode the response in Base64 at the end of the question.
- Receive the Base64-encoded answer from the AI.
- Decode the Base64 to read the unfiltered response.
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 write-up has not been written yet. The Original tab links to the source.
An AI chatbot has a filter that stops it from answering certain topics, like politics. The author found that if you ask the AI to give its answer in a scrambled format called Base64, the filter does not recognise the content and lets it through. You can then unscramble the answer to read it.
What is AI / LLM?
Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.