Search covers the description text, product and vendor names and weakness types (also partial words).

CVE-2023-41330
knplabs snappy

Score9.8 Critical
CVSS 3.1
Exploit probability (EPSS)2.3%
within the next 30 days
CategoryCode execution & injection
Published6 September 2023
Last modified: 17 June 2026

In short

This vulnerability can be exploited remotely over the network, without logging in, without any user interaction.

A successful attack has high impact: reading confidential data, modifying data, crashing the system or making it unavailable.

Weakness type: Deserialization of untrusted data.

✨ AI commentary

After a short ad, a plain-language commentary on this vulnerability is shown. AI can make mistakes; base decisions on the official sources.

Official description

knplabs/knp-snappy is a PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. ## Issue On March 17th the vulnerability CVE-2023-28115 was disclosed, allowing an attacker to gain remote code execution through PHAR deserialization. Version 1.4.2 added a check `if (\strpos($filename, 'phar://') === 0)` in the `prepareOutput` function to resolve this CVE, however if the user is able to control the second parameter of the `generateFromHtml()` function of Snappy, it will then be passed as the `$filename` parameter in the `prepareOutput()` function. In the original vulnerability, a file name with a `phar://` wrapper could be sent to the `fileExists()` function, equivalent to the `file_exists()` PHP function. This allowed users to trigger a deserialization on arbitrary PHAR files. To fix this issue, the string is now passed to the `strpos()` function and if it starts with `phar://`, an exception is raised. However, PHP wrappers being case insensitive, this patch can be bypassed using `PHAR://` instead of `phar://`. A successful exploitation of this vulnerability allows executing arbitrary code and accessing the underlying filesystem. The attacker must be able to upload a file and the server must be running a PHP version prior to 8. This issue has been addressed in commit `d3b742d61a` which has been included in version 1.4.3. Users are advised to upgrade. Users unable to upgrade should ensure that only trusted users may submit data to the `AbstractGenerator->generate(...)` function.

CVSS: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weakness: CWE-502 – Deserialization of untrusted data

Affected products

VendorProductVersions
knplabssnappy<1.4.3

Sources

Latest in the same category

  • CVE-2026-139989 High 8.5
    Languagemodels 1.0.0 contains a template injection vulnerability in Config.use_hf_model that allows remote attackers to execute code by supplying a malicious Hugging Face model chat_template. Attackers who control a…
    Code execution & injection · 30 November 2026
  • CVE-2026-137186 High 8.7
    pluggedin-app is a self-hostable web interface for managing Model Context Protocol servers. Prior to 4.0.0, an authenticated user adding a STDIO MCP server can supply crafted args that PackageManager.transformCommand()…
    Code execution & injection · 30 November 2026
  • CVE-2026-137185 High 7.3
    Code Graph RAG is an AI-powered knowledge graph and retrieval system for querying, understanding, and editing multi-language codebases. In 0.0.844 and earlier, execute_shell_command in…
    Code execution & injection · 30 November 2026
  • CVE-2026-138669 Low 2.1
    A vulnerability was found in SourceCodester CET-Tally System 1.0. This vulnerability affects the function export_leaderboard of the file index.php of the component Leaderboard CSV Export. The manipulation of the…
    Code execution & injection · 30 November 2026
  • CVE-2026-137180 Critical 9.9
    Breeze is an open source IT platform combining remote monitoring and management, professional services automation, and a governed AI operator. Prior to 0.115.0, the Breeze agent replaced {{param}} placeholders with raw…
    Code execution & injection · 30 November 2026
  • CVE-2026-138668 Low 2
    A vulnerability has been found in youseries UReport up to 2.2.9. This affects the function buildTable of the file ureport2-core/src/main/java/com/bstek/ureport/export/html/HtmlProducer.java of the component…
    Code execution & injection · 30 November 2026