The blacked-out report anyone could read

A secondary school published the minutes of a committee meeting on its website as a PDF, with the students’ names covered by black bars.

That afternoon, a student copied a paragraph from the minutes to quote it in an assignment. When he pasted it into his word processor, the full names appeared.

On screen and on paper, the bars covered the names completely, and nobody had changed the file.

Why did the names appear when the text was copied?

How to solve the cases
PDF document with several lines covered by black bars next to a text selection cursor

Hints

Reveal them one at a time, only when you need them.

Solution

The black bars were only drawn on top of the text. The names were still in the PDF, underneath them, and when the paragraph was selected and copied, they were copied too.

What happened?

A PDF describes each page as a set of objects placed at specific positions: pieces of text, images and shapes such as rectangles. If a black rectangle is drawn over a line, the reader paints it on top and the text is no longer visible, but its characters are still stored in the file. Selecting, copying, searching and extracting text all work with those characters, not with what you see.

Back in 2005, the NSA warned in its guide Redacting with Confidence that covering text with black rectangles or highlighting it in black is the most common mistake when preparing documents for release. This is what happened:

  1. In the school office, someone drew black rectangles over the names in the word processor and exported the document to PDF.
  2. During the export, the text and the rectangles went into the PDF as separate objects with the same layout: rectangles on top, names underneath.
  3. On screen and in print, only the bars were visible, so the document looked anonymised.
  4. When the paragraph was selected, the PDF reader copied every character in that area, including those under the bars.

The document hid the names from view but did not remove them. It is a mistake that keeps happening with real documents: in January 2019, a Guardian journalist copied and pasted the blacked-out parts of a filing that Paul Manafort’s defence had submitted to a US court, and the paragraphs that were meant to be hidden appeared.

How could it be fixed and prevented?

To fix it, the school needed to take the PDF off its website as soon as possible, inform the person responsible for data protection and publish a version in which the names had really been removed. There were two reliable ways to do this:

  • Delete the names in the original document and replace them with a marker, such as “[name removed]”, before exporting it to PDF. This is what the NSA recommends: remove the information instead of just hiding it.
  • Use a PDF redaction tool that removes the marked content. In Adobe Acrobat Pro, choose All tools > Redact a PDF > Redact text and images, mark the areas and select Apply. In the dialog box that opens, you can turn on sanitizing to remove hidden information as well, and the result is saved as a new document.

To stop it from happening again, each document should be checked before publication: search for the names, then select and copy the blacked-out areas and paste them into another document. If anything shows up, the file has not been properly anonymised.

Further reading

Why covering text with black rectangles is not enough, and how to really remove it, is explained in the guide Redacting with Confidence: How to Safely Publish Sanitized Reports Converted From Word to PDF — NSA (2005), in the copy published by the US Court of Appeals for the Seventh Circuit.

The steps to redact and sanitize a PDF are in Redact sensitive content in PDFs in Acrobat Pro — Adobe Help.

The case of Paul Manafort’s defence filing is told in Thank you to everyone who can’t redact documents properly — Columbia Journalism Review, by Mathew Ingram (2019).

Have a story worth investigating?

Suggest a case

A project by Eniun

How do you solve the cases?

Each case presents a mystery that seems to defy explanation.

A moderator who knows the solution reads the mystery to the group. The group works out what happened by asking questions, discussing hypotheses and using what they know.

You can project the case on a screen so everyone can read it and refer back to it during the discussion.

The moderator can guide the discussion without giving away the answer. If the group gets stuck, each case offers three graded hints under “Hints”, which can be revealed one at a time.

Once the moderator confirms that the group has found the answer, select “Show answer” to open the solution.

You can also solve the cases on your own: read the story, try to come up with an explanation and use the hints only when you need them.