IP Location.net

Cybersecurity, Privacy, Data & Database

Why Qualified Electronic Signatures Don't Prevent PDF Data Leaks

Privacy-conscious users routinely test for DNS and WebRTC leaks, strip EXIF geotags from photos, and scrub author fields before sharing documents. Far fewer audit the official, digitally signed PDF a company sends back when they exercise their legal right to their own data, even though that file can expose more than any misconfigured resolver.

Why a Qualified Electronic Signature Does Not Audit File Contents

A Qualified Electronic Signature (QES) is the highest tier of electronic signature under the EU's eIDAS regulation. It is created on a qualified signature creation device, backed by a qualified certificate from a supervised trust service provider, and carries the same legal effect as a handwritten signature. In PDF files it is usually implemented in the PAdES format (PDF Advanced Electronic Signatures).

The mechanics are narrow. The signing software hashes the file's bytes (excluding only the slot reserved for the signature), signs that hash with the signer's private key, and embeds the result alongside a /ByteRange array declaring which bytes were covered. At its core, a validator checks two things: that the certificate chains to a trusted authority, and that the covered bytes still match the signed hash. A valid result means the file came from the stated signer and has not been altered since signing.

Nothing else is examined. A validator does not render pages, does not compare what is visible with what is extractable, and has no concept of completeness. It cannot tell whether a black box replaces text or merely sits on top of it, whether 50 rows were chosen to represent 1,995, or whether a complaint log contradicts a security log hundreds of pages later. If cosmetic redaction is what the signer signed, cosmetic redaction is what the signature guarantees.

Four Forensic Layers Inside an 830-Page Signed Export

Four Forensic Layers Inside an 830-Page Signed Export

A recent case shows how far apart "valid signature" and "safe file" can be. Responding to a data access request under GDPR Article 15, a major digital platform produced "Anlage 1" (Annex 1): an 830-page PDF generated with Aspose.PDF for .NET 20.8 and bearing a QES. PhishDestroy's open-source TgWitness forensic analysis documents the file in publicly reproducible form. The findings separate cleanly into four layers.

Layer 1: Visual Overlay vs. Intact Text Layer

A PDF page is a stream of drawing instructions. Text operators place glyphs and keep the characters searchable and copyable. A black box is just a path: a rectangle operator followed by a fill. Drawing the rectangle after the text hides the glyphs on screen while leaving every character in the content stream.

That is what happened here, 1,044 times: solid black vector rectangles over an untouched text layer. Running pdftotext, or pressing Ctrl+A in a viewer, extracts 905,672 readable characters, including usernames and complaint texts belonging to more than 1,800 unrelated third parties. Whether this constitutes a personal data breach, whether the security-of-processing duty in Article 32 was met, and whether the notification duty in Article 33 was triggered are open questions for supervisory authorities and courts.

Layer 2: Metadata and the 36-Second Build Window

The document information dictionary records creation and modification timestamps. The data controller's correspondence described a full month of manual review and sanitization. The file's timestamps span exactly 36 seconds, from 19:58:05 to 19:58:41.

PDF timestamps describe when this specific file was written. They do not capture upstream preparation in databases, ticketing tools, or earlier drafts, so they cannot disprove a month of review. What they do establish is that the final 830-page artifact was written in a single pass, and the intact text layer shows it was never checked for surviving text.

Layer 3: Statistical Distribution Skew

Because the bars hid nothing, the covered content could be compared with the visible content. A complaint table holds 1,995 rows: 50 visible, 1,944 covered, and 1 blank. Across all rows, a broad profile-related category accounts for 1,148 (57.5%) and a security/account-hijacking category for 312 (15.6%).

The 50 visible rows invert that picture. Forty-three (86%) come from the security category, and none come from the majority profile category. The hypergeometric probability of randomly drawing 43 or more security rows in 50 is roughly 6.2 × 10-29. The math establishes that the visible rows were not randomly selected. It does not establish motive: a category-scoped query, an automated filter, or a deliberate editorial choice could each produce the same pattern.

Layer 4: Cross-Section Timeline Contradiction

Visible August 2025 entries allege suspicious account activity or password changes. The Login History in the same PDF ends in May 2025, and the Security History on page 830 records the last password change in July 2024. Page 830 is itself covered by a black bar. The file alone cannot determine whether the logs were truncated or the reports were inaccurate. It shows only that the document contradicts itself, and that the QES catches neither possibility.

How to Audit a Privacy Export Locally With Standard CLI Tools

The same checks can be run on any export with Poppler utilities, qpdf, and coreutils. Work offline, on a copy, and keep the original untouched.

  1. Preserve and fingerprint the original. Run sha256sum export.pdf > export.pdf.sha256 before opening the file in anything else, then set the original read-only. The hash proves later that your findings refer to exactly the file you received; accidental edits (some viewers silently save annotations) would change it.
  2. Read the metadata. pdfinfo export.pdf prints the producer library, creation and modification dates, and page count, while pdfinfo -meta export.pdf adds the XMP metadata stream if one exists. Compare the page count with the cover letter, note the producing software and version, and calculate the creation-to-modification window.
  3. Test every redaction. pdftotext export.pdf - | wc -m counts extractable characters across the whole file, and pdftotext -f 830 -l 830 -layout export.pdf - extracts a single page for comparison with the rendered view. If text appears where the page renders solid black, the redaction is an overlay. Prefer counts and targeted page checks over dumping the full text layer to disk.
  4. Inspect the revision structure. qpdf --show-xref export.pdf lists cross-reference entries and object offsets, and grep -c -a '%%EOF' export.pdf gives a rough count of file revisions. A signed PDF normally carries at least one incremental update for the signature. Additional revisions can retain superseded objects, including content that a later version claims to have removed.

One rule overrides curiosity. If third-party data appears under black bars, do not republish, share, or redistribute it, including in forum posts, bug reports, or screenshots. Preserve the original file and its hash, document findings as counts and page references rather than copies, and notify the competent data protection authority.

Designing Leak-Proof, Verifiable Data Exports

The fix is architectural, and every component already exists.

Protected data should be physically deleted before rendering, so the PDF generator never receives a third-party value at all. Each removed field is replaced with a salted commitment, c = SHA-256(salt || value), using a fresh 16-byte random salt per field. The commitment binds the controller to a specific value without revealing it, and the salt prevents anyone from recovering short values like usernames by hashing guesses.

The original values and their salts go into an asymmetric escrow envelope (OpenPGP, or RSA-OAEP-256 wrapping an AES-256-GCM key) encrypted to the public key of the supervisory authority or court. It opens only with their private key. The requester never sees third-party data, a regulator can decrypt it and recompute any commitment, and the controller cannot quietly substitute different values later.

A signed manifest locks the SHA-256 hash of every output file and the filter predicates applied, ideally with per-category row counts before and after filtering. A selection like 50 of 1,995 rows, with zero from the majority category, would then be declared up front or provably absent.

The supporting infrastructure is already in production. In Germany, the BfDI and state data protection authorities publish OpenPGP keys for encrypted submissions, and courts receive electronic filings through EGVP over the OSCI protocol.

A valid signature tells you who sent a file and that it arrived intact; it says nothing about what the file leaks or leaves out. Privacy verification, like any other leak test, means inspecting the bytes yourself rather than trusting the seal.

Share this Post

Comments

Comments are available to signed-in users and are moderated to keep the discussion useful and respectful. Spam, automated submissions, and low-value promotional comments are removed. Outbound links may be approved when they are relevant and genuinely helpful to readers, but they are displayed as plain text rather than clickable hyperlinks.

No comments have been published yet.

Please sign in to submit a comment.