AIs Hacking the Law

In both a 2021 essay and my 2022 book, A Hacker’s Mind, I talk about AIs finding vulnerabilities and exploits—hacking—the legal system.

Here’s some demonstrations of this from Germany:

Legal systems encode the foundations of social order in natural language. Similar to computer systems, the written law can contain vulnerabilities that invite exploitation.1 Courts absorb most exploits through interpretation, and such vulnerabilities rarely surface in the first place. With highly capable AI systems enabling the discovery of vulnerabilities at unprecedented scale, we believe the latter could change.

In testing this hypothesis, we have identified a substantial number of vulnerabilities in the German legal system using LLMs. To our knowledge, none of these have been previously recorded. We share a selection of vulnerabilities below, and present potential exploits for each. We share only those vulnerabilities whose exploitation we believe would not cause serious harm.

We believe that with cheap legal reasoning proliferating, AI systems could jeopardize the functioning of today’s legal systems. In such a world, lawmakers would need to significantly harden the process of legislation, for example by leveraging advanced AI themselves.

Still in its early stages, but definitely something that’s coming.

Posted on November 3, 2026 at 7:01 AM • 12 Comments

Comments

Rontea • November 3, 2026 8:44 AM

I wonder if our society, worshipping procedure with the zeal of a monk and the memory of a bureaucrat, can endure the laughter of logic when the letter devours the spirit.

Bolt • November 3, 2026 9:19 AM

Shouldn’t civil law systems (like Germany’s) be pretty much immune to this?

If a lawyer tries that kind language maneuvering, the judge can simply say “that’s against the spirit of the law, if you keep pursuing this avenue of legal trickery, I’ll charge you with contempt”.

I’ve heard a judge in my country tell a plaintiff and his lawyer something to the effect of “this is not America, that kind of bs doesn’t fly here”.

Bcs • November 3, 2026 9:43 AM

I suspect we will quickly see a number of judges find something along the lines of “that is blatantly so far beyond the intent of the law as to be unsupportable”.

Given we are already having debates about what the US constitution meant to its authors that’s going to be nothing new, but it is going to feed the literalist vs originalist debate.

GCHRD • November 3, 2026 11:49 AM

Ugh!!

I’m still stuck in 2025, thinking I could use the law to fend off AI.

Bracing for impact . . .

Ferentarius • November 3, 2026 3:38 PM

Re: code is law

Encoding law directly into code may promise automation and speed, but it comes at the cost of flexibility and accountability. Laws are written in natural language for a reason: their interpretation requires nuance, context, and human judgment. Once we reduce them to code, we risk hardcoding oversimplified assumptions and removing the very ambiguity that allows justice to adapt to new circumstances. Automation without interpretability is not just a technical flaw—it’s a systemic risk to democratic governance.

Squeaker in the House • November 3, 2026 4:08 PM

@ Geoffrey Nicoletti,

Let me see your argument is,

“We need one million AGI robots working alongside one billion humans. The planet benefits immensely. We can’t afford anymore democracies; we need dictators to make demands upon the 8 billion people now alive: stop procreating…stop seeing life as meaningful…engage in non-nuclear wars and multiply the number of homicides and suicides…starve if you are a non-worker…give up your rights and your laws and get out of the way of technological advancement. An age of evil to save Mother Nature. Can we find an evil enough leader to believe in and act on the above future?”

So your premise starts with,

1, We need an “evil” Robot AGI future.
2, We need an “evil” POTUS to give us this future.
3, Therefore we must have the Donut Trumper for ever…

I do not know what meds you are on or conversely need to be on.

But consider there is no such thing as Robot AGI currently, nor is there likely to be in your lifetime and certainly not in the life of the “Doh-Gnarled”. AGI robot or otherwise is a scam line from those desperate to keep money flowing into the AI Hype Bubble just befor it dies out. Look up Ed Zitron’s financial cast on just how dead the whole thing now is,

https://www.wheresyoured.at/ai-had-better-work-out/

But further consider your Religeous Cult-Cull nonsense,

There are around 1/3 of a billion people in the US and what you are suggesting is all but a million or so cease to exist…

First off though consider you will probably be one of the first to go just by your attitude alone it is probably reasonable to assume we could start a queue of volunteers to “assist” you.

But seriously consider, nearly a half century ago a US led cult tried the “cyanide cool-aid”, and history says how that came out,

https://www.theguardian.com/world/2018/nov/17/an-apocalyptic-cult-900-dead-remembering-the-jonestown-massacre-40-years-on

So why don’t you have a slogan like,

“A vote for GOP and Trump is not for living well but more rapidly assisted dieing.”

Because in short that is what you are saying.

Clive Robinson • November 3, 2026 7:00 PM

@ Bruce, Ferentarius, ALL,

You say,

“Still in its early stages, but definitely something that’s coming.”

I sincerely hope not for good reason.

Many years ago now @Wael and I were trading comments in a half humourous way and I observed,

“Every rule should have an exception”

That is my thinking was,

“You can not cover all bases, the scope would be to big if not infinite in scope.”

Thus a reasonable person sitting in judgement must be able to say that a law should not be used in a particular case brought before them.

@Wael, then noted that my observation should have a rider on it. Thus be,

“Every rule should have an exception, except this rule.”

Sadly politicians not being the brightest lightbulbs in the corridor on average, as legislators are now introducing,

“No defence legislation”

Which is stupid, and has been pointed out to them as such. So they have added exceptions just for themselves and those who form “Guard Labour” with “Parliamentary and National Security” exceptions.

Which in this modern age of cyber-crime effecting anyone and just about everyone because auditing storage is in practice impossible… Means that “planting evidence” etc now becomes a very effective way of

“Sticking a knife in the back.”

It was something that was repeatedly brought up in various ways in the UK back in the early stages of the formulation of the “Regulation of Investigatory Powers Act”(RIPA) back last century. And has still not been addressed and has noticeably been a reason of judges to use a long pole with a sharp point when dealing with it[1].

It’s why I’ve raised concerns about automated “Client Side Scanning” by AI or other automated agent. And why I repeatedly advise not using the same device for communications and encryption. That is you put the “security end point” beyond the reach of the “communications end point” such that Client Side Scanning can not function. I was saying this back before “Secure Messaging Apps” “became a thing”.

It’s the simple fact that no matter how strong the encryption in the app is, if plaintext / user interface is on the device the communications interface is on, then an “end run attack” through the OS will connect the “User Interface” to the “Communications Interface” rendering the App pointless.

But there is something else to consider @Ferentarius makes the comment of,

“Encoding law directly into code may promise automation and speed, but it comes at the cost of flexibility and accountability”

About “code is law”.

But it also brings “loopholes” it’s why you don’t hear much about “Smart Contracts” any more and the very bad idea of putting code “On the Blockchain”.

To be quite honest now Current AI systems are rapidly finding a veritable plethora of “bugs in software”… I’m surprised that those with criminal intent are not applying AI to “Smart Contracts” and cleaning them out…

Of course now I’ve mentioned it I guess it will “become a thing” and that “code is law” contracts will get abused.

[1] Under RIPA you can be handed a letter which compels you to hand over all encryption keys on demand. Refusal can automatically get you several years in jail… One problem with this is you may never have had the key or even seen it[2]. Thus all I would have to do was send you an email with an encrypted attachment which I’d made with a random key to make you in effect “Guilty as accused” with no burden of proof for the prosecution just the defence (which is not the way UK law traditionally worked). It’s one of the reasons why I’ve looked into the design of “Deniable Encryption”[3]

[2] @Nick P and I discussed the design of a system by use of multiple jurisdictions and M of N secret sharing which you could show in court that you’ve had no reason to see any crypto key and in fact can not be compelled to hand any keys over.

[3] Deniable Encryption has two basic levels to consider,

3.1, An observer can not prove encryption is in use.
3.2, A party in an encrypted communication can not betray another party.

The first can be done with a Code Book of “plaintext words or sentences”, that are in effect of no consequence. That is polite usage salutations or pleasantries, that can not be correlated by an observer to “actions etc”.

The second is by using a Shannon “perfect secrecy cipher” where all messages of the same length or less are “equiprobable” thus a message can be anything you want it to be (Think about the “One Time Pad”). And even if another party betrays you by revealing the actual key used, you can make another key that makes the message decode as a different message.

Both of these can be fairly easily done by LLM’s. And you can expand the idea to show why “guard-rails” can always be bypassed thus “Prompt Injection” attacks and similar will always work. Extending the idea shows why any Sandbox an AI Agent is run in will always be bypassable as long as there is a communications channel.

Larry • November 5, 2026 1:46 PM

I don’t see how legal hacks are long term supportable and allowed. If it is a hack at some point the answer has to change from rolling your eyes and allowing it to saying no that’s a hack and stopping them from doing it. The law isn’t supposed to be a suicide pact. Goodwill and cooperation must be part of the human endeavor.

Rontea • November 5, 2026 2:26 PM

Without the mortar of genuine cooperation, the edifice of law becomes a suicide note scrawled across the skyline.

Clive Robinson • November 5, 2026 5:27 PM

@ Larry, ALL,

You gloss over a hard / soft science transition error with,

“If it is a hack at some point the answer has to change from rolling your eyes and allowing it to saying no that’s a hack and stopping them from doing it.”

Society changes continuously, and it’s path can appear to be more the swinging of a pendulum than actual progress in an identifiable direction.

The law is neither, it is a “stake in the ground” at/or “fixed point in time”.

It’s one of the reasons I’ve said in the past “all laws and regulations” should have “sunset clauses” even the laws on things like murder.

For the law to be respected it has to –in a conservative way– reflect the mores, morals, and traditions of society at all times. Thus the law has to change as society changes.

As has been observed,

“Society has to lead the law”

And as once observed,

“dragging it kicking and screaming by the neck.”

This makes the job of the legislature actually a contemplative one because just saying “You Shall / Shall not…” As has been happening in recent times with “no defence legislation” almost immediately brings the legislators into disrepute as legitimate edge and corner cases arise.

The law should be,

“The frame that holds the lenses through which society looks, not the lenses by which societies view is coloured and brought into focus.”

Ferentarius • November 6, 2026 9:33 AM

One must understand that the law is not the divine eye, but the humble window frame through which man peers at the world. It should hold steady, neither tinting the light with ideologies nor distorting the image with passions. When law becomes a lens, it ceases to be justice; it becomes the whim of the moment, the caprice of passing powers. Let the frame remain firm and pure, and let the vision belong to the soul that dares to see.

Jimmy • November 10, 2026 10:44 PM

The scale point in the Ringe excerpt is what changes the game: courts have always absorbed the occasional clever exploit through interpretation, but interpretation as a defense assumes a trickle, not a flood. Cheap legal reasoning turns isolated cleverness into systematic search, the same way cheap automation turned isolated API quirks into abuse at scale. Rule-governed systems tend to harden only after the flood becomes visible. I run a small independent tracker for AI coding-agent usage-limit reset windows (https://codexreset.today/), and the pattern there is identical: undocumented tolerances quietly become load-bearing until someone probes them systematically, and only then does the platform publish clear, current rules. Lawmakers hardening legislation with their own AI is the predictable next step.

Leave a comment

Blog moderation policy

Login

Allowed HTML <a href="URL"> • <em> <cite> <i> • <strong> <b> • <sub> <sup> • <ul> <ol> <li> • <blockquote> <pre> Markdown Extra syntax via https://michelf.ca/projects/php-markdown/extra/

Sidebar photo of Bruce Schneier by Joe MacInnis.