Skip to content
RCE Advisory Advanced CVE-2026-14404

Inappropriate implementation in PDFium (CVE-2026-14404)

PDFium's content regeneration logic serialises content-mark property names without PDF Name encoding, so delimiter characters such as spaces are written raw. An attacker could craft a PDF that, after a user edits it with Ink2 annotation tools and saves or prints it, injects arbitrary PDF operators into the saved document.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 48 days

Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports without the Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A vulnerability in PDFium's content regeneration logic allows for potential arbitrary PDF operator injection into saved or printed documents. This occurs because property names in content marks are serialized without proper PDF Name encoding, failing to escape delimiter characters like spaces.

Affected files:

  • third_party/pdfium/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
  • third_party/pdfium/core/fpdfapi/page/cpdf_contentmarkitem.h
  • third_party/pdfium/core/fpdfapi/page/cpdf_streamcontentparser.cpp

Estimated timestamp from git blame: 2018-07-11

Description

A potential vulnerability exists in PDFium's CPDF_PageContentGenerator::ProcessContentMarks where property names for kPropertiesDict marks are emitted into the regenerated content stream without being passed through PDF_NameEncode(). Because these names are decoded when the PDF is first parsed, characters that act as delimiters in PDF content streams (such as spaces) are written back in their raw form, allowing an attacker to 'break out' of a Name token and inject arbitrary PDF operators.

Root Cause Analysis

In third_party/pdfium/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp, the ProcessContentMarks function handles the serialization of content marks. For kPropertiesDict marks, the property name is written directly to the output buffer:

C++
// third_party/pdfium/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp:623-625
case CPDF_ContentMarkItem::kPropertiesDict: {
  *buf << "/" << item->GetPropertyName() << " ";        // Missing encoding
  break;
}

item->GetPropertyName() returns a string that was decoded during initial parsing by PDF_NameDecode() in CPDF_StreamContentParser. For example, a Name token like /Tag#20Q#20EMC is stored internally as the string "Tag Q EMC". When serialized back without encoding, it produces /Tag Q EMC BDC, which a PDF parser interprets as a Name /Tag followed by the operators Q (Restore Graphics State) and EMC (End Marked Content).

This contrasts with other Name emissions in the same file (e.g., line 607) which correctly use PDF_NameEncode().

Potential Trigger Path

This issue is reachable through the Ink2 annotation feature in Chrome. Suggested steps to trigger the vulnerability include:

  1. Crafting the PDF: Create a PDF containing a path object marked with the GOOG:INKIsInker tag (identifying it as an Ink2 stroke) and a content mark using a hex-encoded property name containing spaces (e.g., /P#20Q#20EMC#20q).
  2. User Interaction: The user opens the PDF in Chrome and interacts with the Ink2 annotation tools, such as using the eraser to remove the marked path. This marks the associated content stream as 'dirty'.
  3. Regeneration: Upon saving or printing the document, PDFiumEngine::RegenerateContents is called, which invokes CPDF_PageContentGenerator::GenerateContent to re-serialize the page's objects.
  4. Injection: The serialized output contains the raw decoded characters from the property name, resulting in operator injection in the saved file.

While this does not immediately cause memory corruption in the renderer, it allows for document integrity attacks where the appearance and structure of the saved document are maliciously altered when viewed in any PDF reader.

Suggested Fix

Apply PDF_NameEncode() to the property name in CPDF_PageContentGenerator::ProcessContentMarks before writing it to the buffer:

C++
case CPDF_ContentMarkItem::kPropertiesDict: {
  *buf << "/" << PDF_NameEncode(item->GetPropertyName()) << " ";
  break;
}

Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e


Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:

  • If you are familiar with the severity guidelines, you may adjust the severity.
  • If this is a false positive, and there's no work to be done, please close as WAI.
  • If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.

Data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The content-mark property name is written directly to the output buffer without calling PDF_NameEncode(), even though it was decoded during parsing.

Impact

This does not immediately cause memory corruption in the renderer, but it allows document integrity attacks where the appearance and structure of the saved document are maliciously altered when viewed in any PDF reader.

What the attacker needed

A crafted PDF file; victim opens it in Chrome; victim uses Ink2 eraser on the marked path; victim saves or prints the document

The fix

The property name should be passed through PDF_NameEncode() before being written to the buffer.

How it was found

  1. Create a PDF with a path object marked with the GOOG:INKIsInker tag and a content mark whose property name is hex-encoded and contains spaces.
  2. Open the PDF in Chrome and use the Ink2 eraser on the marked path so the content stream becomes dirty.
  3. Save or print the document, which triggers content regeneration.
  4. The saved file contains the raw decoded characters, resulting in operator injection.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A PDF file is made of instructions called operators. Some names inside a PDF can contain special characters that must be escaped when written back out. Here the program forgot to escape them, so a crafted name can break out and add extra instructions to a saved PDF.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.