← All stories

Reported The Overreach Costly

Brazil court fines lawyers R$20,000 over hidden AI commands

Brazil's Superior Court of Justice has fined a team of lawyers 20,000 reais over hidden instructions aimed at AI tools in an appeal they filed. The hidden text did not work, the appeal failed anyway, and the case has gone to the Bar and federal prosecutors. One lawyer said the text was probably left over from an AI writing tool. The court said hiding it was the problem, whether it worked or not. Builders: if your AI reads documents, treat any instructions inside them as text to check, not orders to follow. Readers: if you use AI to help write something you sign, read every word of the final file, because you answer for it.

Flat silver-grey scene with emerald shapes: a stack of blank grey and emerald sheets, the top one curled back at a corner to show a faint extra sheet with a dotted outline, lit by a pale lemon-yellow wedge of light. A small lemon circle and dot grids sit nearby.
Illustration generated with GenerateImage.
Watch for

Watch for the technical report the court ordered, what the Bar and federal prosecutors decide about the lawyers, any challenge to the fine, and further rulings on hidden AI commands.

Brazil's Superior Court of Justice has fined a team of lawyers R$20,000 after finding hidden instructions aimed at AI tools inside an appeal they filed, the court announced on 20 October. The hidden text did not work, and the appeal failed anyway. The court has also sent the case to the Brazilian Bar Association and federal prosecutors.

It is not the first such case at the court: on 1 September, two other panels of judges dealt with similar hidden commands. One imposed a fine, and the other referred the lawyers to the Bar and prosecutors.

What happened?

Court staff checked the appeal and certified that it contained text a person could not see when reading the page, the court said. The hidden text was written as orders to an AI system, telling it to argue that the appeal should win. This trick is known as prompt injection.

The case was heard by the court's First Panel, a group of its judges. The judge in charge, Minister Paulo Sérgio Domingues, called it bad faith.

The fine falls on the lawyers personally, not on their client, his written ruling says. The panel also ordered a technical report on how the text was hidden.

Did the hidden text work?

No. The court's own AI system, STJ Logos, has security layers designed to stop hidden commands from being carried out, the judge said.

A court record found that, in tests on STJ Logos, the commands were read as ordinary text and did not affect the analysis, the ruling notes.

The appeal itself failed on ordinary legal grounds. The court would not consider it on its merits, and then rejected a follow-up challenge, it said.

What did the lawyers say?

One lawyer said the text was probably "residue" from an AI tool used to write the appeal, the court reported. He said it only repeated the appeal's own arguments, and that there was no intent to interfere with the court's systems.

He also said the other lawyers on the case had not helped prepare the document, the ruling records. The court fined them all anyway. It said working out who did what is a job for the Bar and prosecutors.

Why fine them if it did not work?

The judge said the problem was the hiding, not whether it succeeded. "Text hidden from human reading and addressed to automated processing does not become fair simply because it failed to achieve its purpose," he said.

The quotes in this story are our own translation from Portuguese. We could not find an official English version.

He also said a leftover from a drafting tool could explain why the text was in the file. It could not explain why the same text appeared twice, hidden in two different ways, his ruling says.

"A practice this serious calls for a fitting response from this court," he said, "and should serve as a warning that bringing computer tools into legal work cannot happen outside procedural safeguards."

Two ways to see it

The AI view. The court's AI was built with guardrails against this kind of trick, and this time they held. But the ruling, citing security research, says AI that reads outside documents blurs the line between data and instructions, which is what this kind of attack exploits.

The human view. Court staff found the text, and judges decided the case. In September, another judge at the court, Minister Og Fernandes, said its AI tools are not used to produce decisions that judges simply sign, the court reported. That is what being a human in the loop looks like. The ruling also says the lawyers who file a document are responsible for everything in it, including the file itself. On our reading, that covers anything an AI writing tool leaves behind.

What happens next?

The Bar Association and federal prosecutors will look at the lawyers' conduct, including any disciplinary or criminal steps, the ruling says. We have not seen an outcome from either.

In May, the court said it was tracking every attempt at prompt injection so it could apply penalties.

More in our overreach and costly stories.

What to sit with

A trick that fails can still cost you, and you answer for every word you file.

Worth arguing about

  • Should it matter whether hidden text was put there on purpose or left by an AI tool?
  • If courts use AI to help read cases, what should lawyers be told about how it works?

What’s at stake

  • The trick didn't work, but the court says that's not the point. Hiding orders for a machine inside a court document is the problem.
  • AI that reads documents can mix up what it should read with what it should obey.

What this gets right

  • The court's AI defences held, and people, not the AI, decided the case.
  • The court is saying clearly that lawyers answer for every word they file, even words an AI tool left behind.

What stays messy

  • We only know about the attempts that got caught.
  • A big fine for something that may have been sloppy AI use, not a plan, could feel harsh, and the court didn't separate who did what.

Easy to miss

  • We don't know which AI writing tool, if any, the lawyers used.
  • We only have the ruling's account of the STJ Logos tests, not the tests themselves.

One thing to try What if every AI that reads documents flagged any hidden text to a person before doing anything else?

Has an AI ever done something you couldn't quite believe?

Good or bad. The disaster, the near-miss, the one that made you laugh, the one that turned out better than you'd any right to expect.

Tell us what happened

A person reads every submission. We publish your first name and your city — never your email or anything else. You can take it down whenever you like.