New PDF Vulnerability Let Attackers Bypass the Signature Validation in PDF and Replace Content

A team of researchers from the Ruhr-University Bochum in Germany has reported the attacks bypassing the signature validation in PDF. Digitally signed PDFs are used in contracts and invoices to guarantee the authenticity and integrity of their content.

A user opening a signed PDF expects to see a warning in case of any modification. In 2019, Mladenov et al. revealed various parsing vulnerabilities in PDF viewer implementations. They showed attacks that could modify PDF documents without invalidating the signature. As a consequence, affected vendors of PDF viewers implemented countermeasures preventing all attacks.

Shadow Attacks

The shadow attacks avoid all existing countermeasures and break the integrity protection of digitally signed PDFs.


Experts say compared to previous attacks, the shadow attacks do not abuse implementation issues in a PDF viewer. In contrast, shadow attacks use the enormous flexibility provided by the PDF specification so that shadow documents remain standard compliant. Since shadow attacks abuse only legitimate features, they are hard to mitigate.

A shadow PDF document presents trustworthy content to the signers (top document). After signing this document, the attackers modify the document and enforce another view of the document on the victims’ side without invalidating the signature (bottom document).

Shadow Attacks: Hide, Replace, And Hide-And-Replace

  1. Shadow Attack: Hide

Aims to hide the content relevant to the victims behind a visible layer. For example, the attackers can hide the text “You are fired!” behind a full-page picture showing “Sign me to get the reward!”. Once the attackers receive the signed document, they manipulate the document so that the viewer application no longer renders the picture. Hide attacks have two advantages from the attackers perspective:

  • Many viewers show warnings if new visible content is added using Incremental Update. However, they do not warn in most cases if the content is removed.
  • The objects are still accessible within the PDF. In the example above, the text “You are fired!” can still be detected by a search function. This detection might be necessary if an online signing service is used, and it reviews the document by searching for specific keywords.
  • Shadow Attack: Replace

This type of shadow attack uses an Incremental Update that directly changes previously declared objects. Since the modification is not allowed for all types of objects, the attacker only changes objects that are considered harmless but can nevertheless change the document’s visible content.

For instance, the (re)definition of fonts does not change the content directly. However, it influences the view of the displayed content and makes number or character swapping possible.

  • Shadow Attack: Hide-and-Replace

The attackers create a shadow PDF document that is sent to the signers. The PDF document contains a hidden description of another document with different content. Since the signers cannot detect the hidden (malicious) content, they sign the document.

The picture above depicts that attackers successfully manipulate a signed document and force different views on the signers and the victims by using the Hide-and-Replace attack variant.

PDF-Attacker and Detector

PDF-Attacker, a toolset that automatically creates shadow attack exploits. PDF-Detector, a tool to prevent and detect shadow attacks.

The PDF-Attacker takes an arbitrary PDF as input, builds-in the shadow objects (Phase 1), signs the document (Phase 2), and finalizes the attack by enabling the shadow content (Phase 3). The PDF-Detector is a tool to detect malicious documents generated in Phase 1 and Phase 3.

As a result, PDF signatures are designed to protect the integrity and authenticity of PDFs. In contrast to the classical digital signature use cases that apply a signature only once on a target, PDF signatures address more complex use cases. A signed document is allowed to be updated without invalidating its signature, only in particular cases.

You can follow us on LinkedinTwitterFacebook for daily Cybersecurity, and hacking news updates.


Please enter your comment!
Please enter your name here