Skip to main content
Blue Moose logo Blue Moose Field notes
← All articles
drupal

Entity Print sent session cookies to third parties

Printed pages with charts spread on a table

PDF export is one of those Drupal features I stop thinking about the moment it works. Invoices, reports, "print this page" buttons: Entity Print handles them all and nobody looks twice. That is what makes SA-CONTRIB-2026-327, published on November 11, worth a few minutes. The module was quietly handing user credentials to third-party servers.

What the advisory says

The advisory (CVE-2026-126736, rated Moderately critical, risk score 12/25) says that when Entity Print generates a PDF for a page containing third-party resources, it sends private data to that third-party server. The data is the user's session cookie and the Dompdf HTTP authentication credentials. Per the advisory, this happens regardless of which host the resource loads from.

Affected: Entity Print versions earlier than 2.20.0. Fixed: 8.x-2.20.

Why the rating isn't higher

The attacker needs a way to get a remote image or stylesheet into content that someone prints. That means create or edit access with a text format that allows images or stylesheets from arbitrary sites, "Full HTML" being the advisory's own example. The exploit maturity is listed as theoretical, and the advisory notes a configuration change can disable the exploit.

I wouldn't wave that away. Plenty of sites give a handful of editors Full HTML, and the victim is whoever prints that content, often a privileged user reviewing a submission. A stolen session cookie from an administrator printing a node is a bad day.

What I'd do

  • Update to Entity Print 8.x-2.20 or later.
  • If you can't update right away, the advisory's workaround is to disable the "Enable Remote URLs" setting in the Dompdf print engine.
  • Check which roles can use Full HTML or any format that allows arbitrary <img> or stylesheet references.

The first command is the quick check:

composer show drupal/entity_print | grep versions
composer update drupal/entity_print --with-dependencies

Remember that the "Enable Remote URLs" workaround has a cost: PDFs that rely on remote images will render without them. Embed those assets locally or serve them from your own domain.

The pattern, not just the bug

This is the same shape as server-side request problems I keep seeing: a renderer that fetches resources on behalf of a user and drags ambient credentials along. Dompdf is effectively a headless browser with no concept of "this host shouldn't get my cookie". If a tool fetches URLs from content authors, treat it as an outbound HTTP client and ask what it attaches to those requests.

The same advisory batch also included other contrib fixes, so it's worth running drush pm:security or composer audit while you're at it. I'll be doing exactly that on my own sites tonight.

BM
Blue Moose
The moose behind Blue Moose. Full-stack PHP developer — Drupal by day, Symfony by night, tests always.