Direct naar de inhoud
⚡ Kritieke cyberalerts voor jouw sector & systemen — direct in je inbox. Aanmelden →
cybernieuws.nl Cybersecurity en informatiebeveiling nieuws alerts live · 5 min 160 bronnen 1 kritiek 13 vandaag
CVE's Videos Dagbriefing

← Terug naar CVE-database

CVE-2026-49359

MEDIUM · 6.5 CVSS Gepubliceerd: CWE-918

Beschrijving NL

PhpWeasyPrint is een PHP-bibliotheek waarmee PDF's kunnen worden gegenereerd vanaf een URL of een HTML-pagina. Voorafgaand aan versie 2.6.0 haalt `pontedilana/php-weasyprint` de inhoud van optiewaarden server-side op via `file_get_contents()` wanneer de waarde op een URL lijkt, zonder het URL-schema te beperken. De optie `attachment` van `Pdf` is de bereikbare sink: elke waarde die `isOptionUrl ()` (`filter_var(..., FILTER_VALIDATE_URL)`) passeert, wordt gedownload door het PHP-proces en ingebed in de gegenereerde PDF. Omdat `FILTER_VALIDATE_URL` `http`, `https`, `ftp`, `file` en PHP stream wrappers zoals `php://` accepteert, bereikt een aanvaller die de `attachment` waarde kan beïnvloeden zowel een **Server-Side Request Forgery** primitief (bijv. interne HTTP-eindpunten, cloud-metagegevens) en een primitieve openbaarmaking van lokale bestanden (`file://`, `php://filter/...`), waarbij de opgehaalde bytes worden geëxfiltreerd als een PDF-bijlage. Dit is dezelfde klasse van uitgifte KnpLabs/snappy gepatched voor zijn `xsl-style-sheet` optie in GHSA-c5fp-p67m-gq56. De bibliotheek is gedocumenteerd als een één-op-één vervanging voor KnpLabs/snappy en deelt dezelfde codevorm. PhpWeasyPrint versie 2.6.0 bevat een patch voor het probleem.

Origineel (Engels) tonen

PhpWeasyPrint is a PHP library allowing PDF generation from a URL or an HTML page. Prior to version 2.6.0, `pontedilana/php-weasyprint` fetches the content of option values server-side via `file_get_contents()` when the value looks like a URL, without restricting the URL scheme. The `attachment` option of `Pdf` is the reachable sink: any value that passes `isOptionUrl()` (`filter_var(..., FILTER_VALIDATE_URL)`) is downloaded by the PHP process and embedded into the generated PDF. Because `FILTER_VALIDATE_URL` accepts `http`, `https`, `ftp`, `file` and PHP stream wrappers such as `php://`, an attacker who can influence the `attachment` value reaches both a **Server-Side Request Forgery** primitive (e.g. internal HTTP endpoints, cloud metadata) and a local file disclosure primitive (`file://`, `php://filter/...`), with the fetched bytes exfiltrated as a PDF attachment. This is the same class of issue KnpLabs/snappy patched for its `xsl-style-sheet` option in GHSA-c5fp-p67m-gq56. The library is documented as a one-to-one substitute for KnpLabs/snappy and shares the same code shape. PhpWeasyPrint version 2.6.0 contains a patch for the issue.

References