79% vs 51%: independent neobanks lag on app security. Read the report

Deep Dive

Deep Dive

Poppler PDF Password Buffer Overflow (CVE-2026-107705)

Poppler 0.42.0 through 26.10.0 overflows a stack buffer with an over-long R6 PDF password, crashing the process (High 8.3, fixed in 26.11.0).

TL;DR

  • Poppler's Decrypt::revision6Hash() copies an R6 password into two 15,296-byte stack buffers without checking that the password is at most 127 bytes.
  • Applications that pass a user-supplied password to libpoppler, libpoppler-glib, libpoppler-cpp or the C++ API are affected. Poppler's command-line tools truncate the password and are not.
  • The CVE record scores it CVSS v4.0 8.3 High and CVSS v3.1 6.5 Medium. No exploitation in the wild is known, and it is not in CISA KEV as of 2026-11-20.
  • Upgrade to Poppler 26.11.0 or the fixed package for your distribution. See "How do I fix it?" for the 127-byte workaround.

Am I affected?

An application is exposed only when it uses an affected Poppler release and passes a password longer than 127 bytes to it.

  • It uses an affected Poppler release, 0.42.0 through 26.10.0, through libpoppler, libpoppler-glib, libpoppler-cpp, the Qt bindings or a bundled copy.
  • It accepts a password for an R6/AESV3-encrypted PDF, which uses AES-256.
  • It passes that password to Poppler without truncating it to 127 bytes.
  • The password can be longer than 127 bytes.

A malicious PDF alone does not trigger the overflow. The password is a separate input. A service that accepts a PDF and a password from the same untrusted caller is the realistic exposure. A desktop viewer is exposed only if it forwards a password longer than 127 bytes.

Poppler's own pdftoppm, pdftotext and other command-line tools store the password in a 33-byte buffer in 26.10.0. They truncate at 32 bytes and cannot reach the overflow.

Branch Affected versions Fixed version
Upstream Poppler 0.42.0 through 26.10.0 26.11.0
Ubuntu 26.10 Earlier than 26.07.0-2ubuntu1.1 26.07.0-2ubuntu1.1
Ubuntu 26.04 LTS Earlier than 26.01.0-2ubuntu0.3 26.01.0-2ubuntu0.3
Ubuntu 24.04 LTS Earlier than 24.02.0-1ubuntu9.11 24.02.0-1ubuntu9.11
Ubuntu 22.04 LTS Earlier than 22.02.0-2ubuntu0.15 22.02.0-2ubuntu0.15
Debian 13 (trixie) 25.03.0-5+deb13u4 and earlier No fixed package as of 2026-11-20
Debian 12 (bookworm) 22.12.0-2+deb12u3 and earlier No fixed package as of 2026-11-20
Debian sid and forky Earlier than 26.07.0-4 26.07.0-4

The CVE record scores it CVSS v4.0 8.3 High. The vector is CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N. The record also lists CVSS v3.1 6.5 Medium with the vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H. The weakness is CWE-121, a stack-based buffer overflow.

Ubuntu 20.04 LTS and older are listed as needing evaluation and have no fixed package. The Ubuntu page was last updated on 2026-11-09. The Debian tracker listed Debian 12 and Debian 13 as vulnerable on 2026-11-20.

Check the running version:

# Poppler utilities version. The library package follows the same source release.
pdftoppm -v

# Debian or Ubuntu: installed poppler-utils version
dpkg-query -W -f='${Version}\n' poppler-utils

# Fedora, RHEL or CentOS Stream
rpm -q poppler

# Arch Linux
pacman -Q poppler

# macOS with Homebrew
brew list --versions poppler

An application that bundles its own Poppler, such as a Flatpak, a Snap or a language wheel, needs its own update. The system package does not change the bundled copy.

How do I fix it?

Upgrade to Poppler 26.11.0 or later, or to the fixed package your distribution publishes. The upstream fix is commit 60e19a30 and is in the 26.11.0 release.

  1. On Ubuntu 22.04, 24.04, 26.04 or 26.10, update the package and confirm the version:
sudo apt update
sudo apt install --only-upgrade poppler-utils
pdftoppm -v

The core library package name follows the soname. For example, it is libpoppler118 on Ubuntu 22.04 and libpoppler134 on Ubuntu 24.04. Upgrading poppler-utils pulls the new core library. If your application uses the GLib or C++ bindings, the binding package depends on that core library and picks up the fix with it.

  1. On Debian 12 or Debian 13, no fixed package was available on 2026-11-20. Wait for the security update, build 26.11.0 from the release tarball, or apply commit 60e19a30 to the package. Debian sid and forky have 26.07.0-4, which includes the fix.

  2. On Fedora 44 or Fedora 45, upgrade the packages:

sudo dnf upgrade poppler poppler-glib poppler-cpp

Fedora's package spec carries the fix as poppler-26.08.0-decrypt-password-length.patch in Fedora 44 and Fedora 45. Fedora 43 does not carry it.

  1. On Arch Linux, upgrade the rolling package:
sudo pacman -Syu poppler

Arch had poppler 26.11.0-1 on 2026-11-20.

  1. On macOS with Homebrew, upgrade the formula:
brew upgrade poppler

Homebrew had poppler 26.11.0 on 2026-11-20.

  1. In a container, rebuild the image from a base that carries the fixed package and recreate the container. Pulling a new image tag is not enough if the image still contains the old library layer.

If you cannot upgrade yet, cap the password before it reaches Poppler:

  1. Reject any password longer than 127 bytes at the API boundary, the login form or the command-line wrapper that calls Poppler.
  2. Test with a 500-byte password against an affected build and confirm the application returns a validation error instead of reaching the library.

The workaround closes the path into revision6Hash() for the code you control. It does not fix other callers in the same process. It also does not protect an application that passes the password to Poppler through a path you do not control.

What is the root cause?

Decrypt::revision6Hash() sizes its K1 and E stack buffers for a 127-byte password, but it derives the copy length from the unbounded GooString that makeFileKey() passes in.

Poppler is a PDF rendering library used by desktop viewers, office suites and document converters. It implements the encryption handlers defined by the PDF standard. Revision 6 (R6), also called AESV3, is the AES-256 scheme used by modern encrypted PDFs. Its key derivation is Algorithm 2.B in ISO 32000-2: a loop that builds a 64-block string, hashes it and repeats.

Decrypt::makeFileKey() handles the owner and user password paths. For R5 and R6 it clamps a local test buffer to 127 bytes, then calls revision6Hash() with the original password object:

len = userPassword->size();
if (len > 127) {
    len = 127;                 // clamps the local test[] copy only
}
memcpy(test, userPassword->c_str(), len);
...
revision6Hash(userPassword, test, nullptr);   // full password, no cap

That is poppler/Decrypt.cc:126-136 at tag poppler-26.10.0. The owner path is the same at lines 86-96.

revision6Hash() then reads the full length and uses it to size the copy:

unsigned char K1[64 * (127 + 64 + 48)];
unsigned char E[64 * (127 + 64 + 48)];
...
int inputPasswordLength = inputPassword->size();
...
sequenceLength = inputPasswordLength + KLength + userKeyLength;
totalLength = 64 * sequenceLength;
memcpy(K1, inputPassword->c_str(), inputPasswordLength);
...
for (int i = 1; i < 64; ++i) {
    memcpy(K1 + (i * sequenceLength), K1, sequenceLength);
}

That is poppler/Decrypt.cc:1767-1793 at the same tag.

The arrays hold 15,296 bytes each, 64 blocks of 239 bytes. The 239 is the array's sizing: the 127-byte password limit plus a 64-byte allowance for K plus 48 bytes of user key. The code sets KLength to 32, so each block has 32 bytes of spare room beyond a 207-byte owner sequence.

The first memcpy writes the password and the next writes K. The loop then copies the growing block 63 more times.

The copy leaves K1 once sequenceLength passes 239 bytes. sequenceLength is the password length plus the 32-byte K and, on the owner path, 48 bytes of user key. That happens beyond 159 bytes on the owner path. On the user path the sequence adds only the 32-byte K, so it happens beyond 207 bytes.

The CVE describes the trigger as a password longer than 127 bytes, the R6 limit. The code's exact threshold is higher because the array is sized for a 239-byte sequence.

A 500-byte user password produces a 532-byte sequence, and the loop writes 34,048 bytes in total. The same length drives the E writes in the encryption loop.

Nothing in makeFileKey() rejects a long password. The R6 specification limits the password to 127 bytes, but the code applies that limit only to its own test buffer. The function then passes the full string to revision6Hash().

The call path starts at PDFDoc::checkEncryption() (poppler/PDFDoc.cc:405), goes through SecurityHandler::checkEncryption() (poppler/SecurityHandler.cc:77) and StandardSecurityHandler::authorize() (poppler/SecurityHandler.cc:284), and reaches Decrypt::makeFileKey(). Any application that opens an R6 PDF through the library and supplies a password takes this path.

How is it exploited?

An attacker who controls the password input of an affected application can crash it, or corrupt its stack. The attacker supplies a password long enough to push the copy past the buffers, such as 500 bytes, for an R6-encrypted PDF. The password does not have to be correct: revision6Hash() runs before the hash comparison.

  1. The attacker finds an application that accepts an R6/AESV3 PDF and a password from the same untrusted caller, such as a conversion service or an API that opens protected documents.
  2. The attacker supplies any R6-encrypted PDF. The content does not matter; the PDF only has to select revision 6.
  3. The attacker supplies a password long enough to cross the threshold, for example 500 A characters.
  4. The application passes the password to PDFDoc or poppler_document_new_from_stream().
  5. makeFileKey() clamps its local test buffer but passes the full password to revision6Hash().
  6. revision6Hash() computes sequenceLength from the full length and copies 64 blocks into K1, past the 15,296-byte buffer.
  7. The process crashes or continues with corrupted stack memory, depending on the layout and the mitigations.

The public report includes a small driver and a qpdf command that reproduce the crash. This is the reporter's code, trimmed to the call that passes the password:

std::optional<GooString> user;
user.emplace(std::string(argv[2]));
auto doc = std::make_unique<PDFDoc>(std::make_unique<GooString>(argv[1]), std::nullopt, user);

The PDF is a normal R6 file:

qpdf --encrypt "userpw" "ownerpw" 256 -- dummy.pdf enc2.pdf
qpdf --show-encryption enc2.pdf | head -3   # expect R = 6

Running the driver with a 500-byte user password makes AddressSanitizer report the write:

WRITE of size 532 at 0x... thread T0
#0 ... in memcpy
#1 ... in revision6Hash .../poppler/Decrypt.cc:1792
#2 ... in Decrypt::makeFileKey .../poppler/Decrypt.cc:136
#3 ... in StandardSecurityHandler::authorize .../poppler/SecurityHandler.cc:284

With a 200-byte owner password, the same path reports WRITE of size 280 from the owner call at Decrypt.cc:96. The reporter reproduced the crash on an AddressSanitizer build of master 8dfee73a and on a released Ubuntu package through libvips 8.x. The report shows the crash for a 200-byte owner password and a 500-byte user password. The report does not demonstrate code execution.

How does the attack flow?

An attacker who controls the password input sends a password long enough to push the copy past the buffers to an application that opens an R6 PDF. The unclamped length carries the copy past the stack buffers.

flowchart LR A["Attacker supplies a
long R6 password"] --> B["Application forwards it
to libpoppler"] B --> C["PDFDoc opens an
R6/AESV3 PDF"] C --> D["makeFileKey clamps only
its local test buffer"] D --> E["revision6Hash: no check
on the full length"] E --> F["K1 and E overflow
the 15,296-byte buffers"] F --> G["Crash or stack
memory corruption"]

What can an attacker do?

The attacker can crash the process and corrupt stack memory. The CVE record rates availability High and integrity Low, and it does not claim code execution.

  • Control of the password input is required. A PDF alone is not enough.
  • The target must use an affected Poppler release and open an R6-encrypted PDF.
  • The application must pass the password to Poppler without a 127-byte cap.
  • On a service that converts untrusted documents, one request can crash a worker, and repeated requests can keep it down.
  • On a desktop viewer, the attacker needs the user to enter a password long enough to cross the copy threshold, which is a much narrower path.

The report describes potential code execution depending on the stack layout and the mitigations, but it does not demonstrate it. Confidentiality impact is None in both CVSS vectors. The attacker does not get file contents or memory disclosure from this bug as described.

Why does the fix work?

The fix truncates the password to 127 bytes before it reaches revision6Hash(), so the length that sizes the copies can no longer exceed the buffers.

@@ -57,16 +57,18 @@
 static void sha512(unsigned char *msg, int msgLen, unsigned char *hash);

+constexpr int kMaxPasswordLength = 127;
+
 //------------------------------------------------------------------------
 // Decrypt
 //------------------------------------------------------------------------
@@ -74,20 +76,18 @@
     unsigned char fx, fy;
-    int len, i, j;
+    int i, j;

     *ownerPasswordOk = false;

     if (encRevision == 5 || encRevision == 6) {

         // check the owner password
-        if (ownerPassword) {
+        if (ownerPasswordA) {
             //~ this is supposed to convert the password to UTF-8 using "SASLprep"
-            len = ownerPassword->size();
-            if (len > 127) {
-                len = 127;
-            }
-            memcpy(test, ownerPassword->c_str(), len);
+            const std::string ownerPassword = ownerPasswordA->toStr().substr(0, kMaxPasswordLength);
+            const int len = ownerPassword.size();
+            memcpy(test, ownerPassword.c_str(), len);
             memcpy(test + len, ownerKey->c_str() + 32, 8);
             memcpy(test + len + 8, userKey->c_str(), 48);
             sha256(test, len + 56, test);
             if (encRevision == 6) {
                 // test contains the initial SHA-256 hash as input K.
                 revision6Hash(ownerPassword, test, userKey->c_str());
             }

makeFileKey() now builds a std::string from the password and takes the first 127 bytes. It uses that string for the local test buffer and for the revision6Hash() call. revision6Hash() takes the string by reference, so its inputPasswordLength is the truncated length. Both the owner path at Decrypt.cc:88 and the user path at Decrypt.cc:126 are changed.

The fix is complete for this path. revision6Hash() is called only from the owner and user branches of makeFileKey(). Every call now passes the capped string. The older encryption revisions use makeFileKey2(), which caps its input at 32 bytes and does not call revision6Hash().

The same release raises the command-line tools' password buffer from 33 to 128 bytes. The tools accept up to 127 bytes and still cannot exceed the cap.

How do I check if I was compromised?

No indicators of compromise are published, and no exploitation in the wild is known.

Check for crashes when opening encrypted PDFs. The glibc fortify check prints *** buffer overflow detected ***. AddressSanitizer prints a WRITE of size ... report in revision6Hash.

# Core dumps from the last 30 days
coredumpctl list --since "30 days ago"

# Kernel and service logs for the fortify or stack protector message
journalctl --since "30 days ago" | grep -iE "buffer overflow detected|stack smashing detected"

A hit is a lead, not proof. The overflow can crash the process before it writes any application log. A failed attempt may leave only a core dump or nothing.

Timeline

  • 2026-10-04: Aziz Elbelaychy reproduces the overflow on Poppler master 8dfee73a with AddressSanitizer.
  • 2026-10-05: The public GitLab issue 1814 is created. The CVE record lists this as the public date.
  • 2026-10-07: Merge request 2398 is opened with the fix.
  • 2026-10-08: CVE-2026-107705 is published by VulnCheck.
  • 2026-10-09: Merge request 2398 is merged as commit 60e19a30.
  • 2026-11-05: Poppler 26.11.0 is released with "Properly apply password length limit".
  • 2026-11-20: The CVE is not in CISA KEV, and no exploitation is known.

Timeline of CVE-2026-107705: public report on 2026-10-05, fix merged on 2026-10-09, release on 2026-11-05
Figure 1: From the public report to the fixed release in 31 days. Source: Poppler GitLab issue 1814, merge request 2398 and release notes, checked November 20, 2026.

FAQ

Does a malicious PDF alone trigger the overflow?

No. The attacker must also control the password and make it long enough to cross the copy threshold. A PDF that only selects R6 encryption is not enough.

Are pdftoppm and pdftotext affected?

No. In 26.10.0 and earlier, the command-line tools store the password in a 33-byte buffer and truncate at 32 bytes. 26.11.0 raises the buffer to 128 bytes, which still caps the password at 127.

Is this remote code execution?

No. The report describes a crash at minimum and potential code execution depending on the stack layout and the mitigations. The CVE record rates availability High and integrity Low.

Do I need the correct password?

No. revision6Hash() runs before the hash comparison, so any password long enough to cross the threshold reaches the overflow, correct or not.

Which encryption schemes are affected?

Only revision 6, the AESV3/AES-256 scheme. Revision 5 and the older RC4 and AES-128 schemes do not call revision6Hash().

Is Debian 12 or Debian 13 fixed?

No. The Debian security tracker listed both as vulnerable on 2026-11-20. Debian sid and forky have 26.07.0-4, which includes the fix. Debian 12 and Debian 13 readers need the security update when it lands, or the upstream 26.11.0 build.

Find vulnerable Poppler copies in your images with Ostorlab

Ostorlab's software composition analysis inventories the Poppler version in your container images so you can find releases before 26.11.0. Aziz Elbelaychy reported the flaw.

References

  • CVE Program, "CVE-2026-107705": https://www.cve.org/CVERecord?id=CVE-2026-107705 (checked November 20, 2026)
  • VulnCheck, "Poppler 0.42.0 through 26.10.0 Stack Buffer Overflow via Decrypt::revision6Hash()": https://www.vulncheck.com/advisories/poppler-0.42.0-through-26.10.0-stack-buffer-overflow-via-decrypt-revision6hash (checked November 20, 2026)
  • Poppler, GitLab issue 1814, "Stack buffer overflow in Decrypt::revision6Hash() with passwords longer than 127 bytes (R6/AESV3)": https://gitlab.freedesktop.org/poppler/poppler/-/work_items/1814 (checked November 20, 2026)
  • Poppler, merge request 2398, "Decrypt: Properly apply password length limit": https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/2398 (checked November 20, 2026)
  • Poppler, poppler/Decrypt.cc at tag poppler-26.10.0: https://gitlab.freedesktop.org/poppler/poppler/-/blob/poppler-26.10.0/poppler/Decrypt.cc (checked November 20, 2026)
  • Poppler, poppler/Decrypt.cc at tag poppler-26.11.0: https://gitlab.freedesktop.org/poppler/poppler/-/blob/poppler-26.11.0/poppler/Decrypt.cc (checked November 20, 2026)
  • Poppler, "Poppler 26.11.0": https://poppler.freedesktop.org/ (checked November 20, 2026)
  • Poppler, commit 60e19a30: https://gitlab.freedesktop.org/poppler/poppler/-/commit/60e19a30152560fcccfb2ae7f7559eda560c0160 (checked November 20, 2026)
  • Ubuntu, "CVE-2026-107705": https://ubuntu.com/security/CVE-2026-107705 (checked November 20, 2026)
  • Debian, "CVE-2026-107705": https://security-tracker.debian.org/tracker/CVE-2026-107705 (checked November 20, 2026)
  • Fedora, poppler spec: https://src.fedoraproject.org/rpms/poppler/blob/f45/f/poppler.spec (checked November 20, 2026)
  • Arch Linux, poppler package: https://archlinux.org/packages/extra/x86_64/poppler/ (checked November 20, 2026)
  • Homebrew, poppler formula: https://formulae.brew.sh/formula/poppler (checked November 20, 2026)
  • CISA, Known Exploited Vulnerabilities catalog: https://www.cisa.gov/known-exploited-vulnerabilities-catalog (checked November 20, 2026)