New Injection Technique Exfiltrates Sensitive Data in PDF Files

NJCCIC Advisory

Original Release Date: 12/17/2020

Summary

PDF files are widely used for document sharing among businesses and may contain sensitive information. A new code-injection technique was discovered that allows threat actors to inject code and exfiltrate data as in classic cross-site scripting (XSS) attacks, and with capabilities of escaping objects such as parentheses and backslashes, hijacking links, and executing arbitrary JavaScript inside PDF files. The two popular libraries vulnerable to exploitation are PDF-Lib and jsPDF.

Recommendations

The NJCCIC recommends developers escape parentheses and backslashes when accepting users input within text streams or annotation URIs and perform validation on any content going into PDFs to ensure PDF code cannot be injected. We advise users to exercise caution when clicking on links or attachments and verify the legitimacy of requests via a separate means of communication. Further technical details, whitepaper, and presentation can be found in the PortSwigger article.

New Jersey Cybersecurity & Communications Integration Cell

2 Schwarzkopf Dr, Ewing Township, NJ 08628

njccic@cyber.nj.gov

OUR COMMITMENT

The NJCCIC is a component organization within the New Jersey Office of Homeland Security and Preparedness. We are the State's one-stop-shop for cyber threat analysis, incident reporting, and information sharing and are committed to making New Jersey more resilient to cyber threats by spreading awareness and promoting the adoption of best practices.

Agency Seals of State of NJ, NJOHSP and NJCCIC

STAY CONNECTED:

View our Privacy Policy here.

View our Site Index here.