/

CVE-2026-46529

Severity:

HIGH RISK

(7.8)

Command Injection (CWE-77) in Atril PDF Link Handling

CVE-2026-46529

Deferred

Vulnerability type

Category:

Command Injection

CWE:

CWE-77, CWE-88, CWE-829

Impact:

Remote Code Execution

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A command injection flaw in Atril Document Viewer lets attackers execute arbitrary code when a user clicks a crafted link inside a malicious PDF file.

By abusing unescaped link-destination fields and GTK module loading, a single polyglot PDF/ELF file can achieve configuration-independent code execution on affected MATE desktop systems.

Affected context

This vulnerability occurs in Atril when handling hyperlink actions embedded in PDF documents.

It becomes relevant when:

  • Users open untrusted or attacker-crafted PDFs
  • The PDF contains specially crafted link-destination fields
  • The environment uses default Atril configurations without additional hardening

Under these conditions, Atril's link handling logic may interpret attacker-controlled data as part of a shell-processed command line.

Exploit preconditions

  • Attack surface: User interaction with Atril via opening and clicking links in PDF documents
  • Required access: Ability to deliver a malicious PDF to the target (e.g., email, download, file share)
  • User action: The user must open the document in Atril and click the crafted link once
  • Trigger point: Atril's ev_spawn builds a command line from PDF link-destination fields and passes it to g_app_info_create_from_commandline
  • Why exploitation is possible: Link-destination fields are not safely quoted or escaped (e.g., missing g_shell_quote), allowing injection of arguments like --gtk-module=PATH that are later interpreted and cause GTK to dlopen() attacker-controlled shared libraries.

Why this happens

The underlying bug class maps to command and argument injection (CWE-77 and CWE-88), combined with loading untrusted code via external modules (CWE-829).

Atril constructs a shell-parseable command line from data originating in PDF link-destination fields, treating this untrusted input as trusted command components.

Because the input is not passed through robust quoting, escaping, or structured argument APIs, an attacker can smuggle additional parameters into the command line.

GTK's module loading (--gtk-module=PATH) then resolves and loads attacker-provided shared libraries, turning the injected argument into arbitrary code execution during initialization.

Potential impact

  • Arbitrary code execution in the context of the user running Atril
  • Installation of backdoors or persistence mechanisms on the user's account
  • Execution of arbitrary system commands, including data theft or destructive actions
  • Lateral movement within the user's session (e.g., accessing other applications or files)
  • Potential escalation of impact if combined with local privilege escalation vulnerabilities

General mitigation guidance

Pattern-based mitigations for this class of vulnerability focus on reducing trust in user-controlled data and avoiding shell-like command construction:

  • Use structured APIs that accept argument arrays instead of constructing shell-parsed command lines from strings.
  • Apply strict quoting/escaping (e.g., g_shell_quote equivalents) to any data that must appear in command lines, and prefer avoiding shell interpretation entirely.
  • Treat document-embedded metadata (such as PDF link-destination fields) as untrusted input and validate or constrain allowed formats before use.
  • Limit or sandbox dynamic module loading paths so user-controllable fields cannot point directly to loadable shared libraries.
  • Apply least-privilege principles so that, even if document viewers are compromised, their ability to affect the wider system is reduced.

How teams detect issues like this

High-level detection approaches for similar issues typically include:

  • Static analysis rules that flag string-based command construction and calls to APIs that accept command lines instead of argument vectors.
  • Code review checklists that require scrutiny of any use of user-controlled document fields in process spawning, module loading, or configuration options.
  • Security-focused linters for GUI and document applications that detect uses of g_app_info_create_from_commandline and related APIs with untrusted input.
  • Policy enforcement in CI/CD pipelines to block merges when patterns like shell-parsed command lines or unvalidated module paths are detected.
  • Targeted tests where fuzzed or crafted documents exercise hyperlink and action handling paths to observe unexpected argument parsing or dynamic loading behavior.

Sources

SourceLink
github.comgithub.com/mate-desktop/atril/releases/tag/v1.26.3
github.comgithub.com/mate-desktop/atril/releases/tag/v1.28.4
github.comgithub.com/mate-desktop/atril/security/advisories/GHSA-vgv2-m826-8f6f
openwall.comopenwall.com/lists/oss-security/2026/05/19/34
openwall.comopenwall.com/lists/oss-security/2026/05/21/7
openwall.comopenwall.com/lists/oss-security/2026/05/22/11
lists.debian.orglists.debian.org/debian-lts-announce/2026/05/msg00041.html
lists.debian.orglists.debian.org/debian-lts-announce/2026/05/msg00042.html
lists.debian.orglists.debian.org/debian-lts-announce/2026/06/msg00021.html
access.redhat.comaccess.redhat.com/errata/RHSA-2026:27819
access.redhat.comaccess.redhat.com/errata/RHSA-2026:28998
access.redhat.comaccess.redhat.com/errata/RHSA-2026:33169
access.redhat.comaccess.redhat.com/errata/RHSA-2026:33416
access.redhat.comaccess.redhat.com/errata/RHSA-2026:39115
access.redhat.comaccess.redhat.com/errata/RHSA-2026:41904
access.redhat.comaccess.redhat.com/errata/RHSA-2026:42692
access.redhat.comaccess.redhat.com/errata/RHSA-2026:43398
access.redhat.comaccess.redhat.com/errata/RHSA-2026:46467
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-46529
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2487669
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-46529.json

Frequently asked

questions

It is not exploitable purely over the network; the attacker must get the victim to open a malicious PDF in Atril and click a link. However, once that single click occurs, the attacker's code can execute without further interaction.

The attacker gains code execution with the privileges of the user running Atril. They cannot directly become root via this bug alone, but they can perform any actions the user can, and potentially chain this with other local privilege escalation issues.

Avoid building shell-parsed command lines from untrusted input. Instead, use APIs that accept pre-split argument lists, strictly validate allowable parameters, and ensure any remaining user-controlled data is robustly quoted or escaped before use.

Design link and action handling code around strict trust boundaries: treat document content as untrusted, avoid shell interpretation entirely, restrict dynamic loading to trusted locations, and include automated checks in development workflows that flag command construction and module-loading patterns involving user input.

Find out what's already
exploitable in your codebase.