CVE-2026-16770
KrytyczneCVSS 9.8Prawdopodobieństwo exploitacji (EPSS)
Niskie ryzykoPercentyl 8 - wyżej niż 8% wszystkich znanych CVE
Streszczenie
Biblioteka PDF::WebKit dla Perla (do wersji 1.2) pozwala na wstrzyknięcie argumentów do polecenia wkhtmltopdf przez meta tagi w źródłowym dokumencie HTML. Meta tagi o nazwie pdf-webkit-KEY są konwertowane na opcje linii poleceń wkhtmltopdf bez sprawdzania listy dozwolonych, co umożliwia nadpisanie domyślnych opcji i opcji przekazanych do konstruktora.
Ocena ryzyka
Jeśli aplikacja renderuje niezaufany HTML, dokument może wybrać opcje renderera, w tym takie, które umożliwiają odczyt lokalnych plików do wynikowego PDF lub zapis do wybranej ścieżki, co może prowadzić do ujawnienia danych lub zapisu do nieautoryzowanych lokalizacji.
Rekomendacja
Należy unikać renderowania niezaufanego HTML za pomocą PDF::WebKit lub upewnić się, że meta tagi nie są przetwarzane. Zaleca się aktualizację do wersji, która ogranicza dozwolone opcje wkhtmltopdf.
Oryginalny opis (angielski, źródło NVD)
PDF::WebKit versions through 1.2 for Perl allow argument injection into wkhtmltopdf via meta tags in the source document. For an HTML string or file source, the constructor collects every <meta name="pdf-webkit-KEY" content="VALUE"> element in the document head through _pdf_webkit_meta_tags and turns each one into a wkhtmltopdf command line option. KEY is normalized to an option name matching --[a-z0-9-]+ but is not checked against an allow list, VALUE is passed through unchanged as the argument that follows it, and a VALUE of "yes" emits the option as a bare flag. BUILD merges the meta derived options last, so they also override the module defaults and the options passed to new. Switches such as --enable-local-file-access and --cookie-jar are reachable this way. The renderer is executed with an argument list rather than a shell command, so this is argument injection and not shell injection. Any caller that renders untrusted HTML lets the document choose the renderer's options and override those set by the application, including options that read local files into the resulting PDF or write to a chosen path. A URL source is not scanned, and the scan is skipped when XML::LibXML, a recommended dependency, is not installed.

