Repository navigation
Conversation
Commit 50052ea quotes the page label, named destination and search string. However, g_app_info_create_from_commandline() expands field codes like %f before splitting the arguments, even inside quotes. Hence "50% off" arrives as "50off", and a named destination "%f" becomes the document path, unquoted, which can split it into several arguments. Page labels and named destinations come from the document, so this is still the argument injection of CVE-2026-46529. Escape "%" as "%%" after quoting. Based on Evince commit cf6dfa30d54b90af03a8fa52481efe792ea0bfd1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fix for CVE-2026-46529 (50052ea here) quotes the page label, named
destination and search string passed to ev_spawn() with g_shell_quote().
However, g_app_info_create_from_commandline() expands desktop entry
field codes like %f before splitting the arguments, even inside quotes.
A named destination or page label "%f" in a document becomes the
document's path, unquoted, which can split it into several arguments
of the new process; and "50% off" arrives as "50off".
This escapes "%" as "%%" after quoting, as Evince does since
cf6dfa30d (Evince 48.5):
https://gitlab.gnome.org/GNOME/evince/-/commit/cf6dfa30d54b90af03a8fa52481efe792ea0bfd1
GLib documents that the Exec key rules apply, so "%" must be doubled:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/5187
Used Evince's test for checking this (test-ev-spawn), built against this
helper, passes; with g_shell_quote() alone it fails.