Security Resilience

CVE-2023-28115

RCE in Knplabs Snappy ≤ 1.4.2

Published
17 March 2023
Modified
21 November 2024
Patch / advisory
CVSS Score v3.1 9.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.028 86th percentile
Risk Priority 83 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2023-28115 is a critical-severity Deserialization of Untrusted Data (CWE-502) vulnerability in Knplabs Snappy. Its CVSS base score is 9.8 (Critical).

Operationally, exploitation aligns with the MITRE ATT&CK technique Junk Data (T1001.001); ranked in the top 14% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

Snappy, a PHP library used for generating thumbnails, snapshots, or PDFs from URLs or HTML pages, is affected by CVE-2023-28115. The flaw stems from insufficient validation of input protocols passed to the file_exists() function in AbstractGenerator.php, allowing PHAR deserialization. This was present in versions prior to 1.4.2 and is tracked under CWE-502 with a CVSS score of 9.8.

An attacker able to upload arbitrary files to the server can supply a phar:// URI, triggering unserialization of the uploaded content and instantiation of attacker-controlled PHP objects. When Snappy is integrated with frameworks such as Laravel or Symfony that contain known property-oriented programming chains, or when an attacker can control the output path of generateFromHtml(), this leads directly to remote code execution.

The maintainers addressed the issue in release 1.4.2 through commits that add protocol checks before file operations; users should upgrade to this version to eliminate the deserialization vector.

EPSS scores for the CVE rose from a low baseline to a peak of 0.1675 (current value 0.1139), indicating increased exploitation interest after public disclosure.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

Snappy is a PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Prior to version 1.4.2, Snappy is vulnerable to PHAR deserialization due to a lack of checking on the protocol before passing it…

more

into the `file_exists()` function. If an attacker can upload files of any type to the server he can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution especially when snappy is used with frameworks with documented POP chains like Laravel/Symfony vulnerable developer code. If a user can control the output file from the `generateFromHtml()` function, it will invoke deserialization. This vulnerability is capable of remote code execution if Snappy is used with frameworks or developer code with vulnerable POP chains. It has been fixed in version 1.4.2.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1001.001 Junk Data Command And Control
Adversaries may add junk data to protocols used for command and control to make detection more difficult.
T1001.003 Protocol or Service Impersonation Command And Control
Adversaries may impersonate legitimate protocols or web service traffic to disguise command and control activity and thwart analysis efforts.
T1003.001 LSASS Memory Credential Access
Adversaries may attempt to access credential material stored in the process memory of the Local Security Authority Subsystem Service (LSASS).
T1003.007 Proc Filesystem Credential Access
Adversaries may gather credentials from the proc filesystem or `/proc`.
T1005 Data from Local System Collection
Adversaries may search local system sources, such as file systems, configuration files, local databases, virtual machine files, or process memory, to find files of interest and sensitive data prior to Exfiltration.
T1006 Direct Volume Access Stealth
Adversaries may directly access a volume to bypass file access controls and file system monitoring.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2023-41330Same product: Knplabs Snappy
CVE-2026-93872Shared CWE-502
CVE-2023-35317Shared CWE-502
CVE-2024-32603Shared CWE-502
CVE-2026-22333Shared CWE-502
CVE-2025-62368Shared CWE-502
CVE-2026-17637Shared CWE-502
CVE-2024-7435Shared CWE-502
CVE-2025-3425Shared CWE-502
CVE-2025-23006Shared CWE-502

Affected Assets

knplabs
snappy
≤ 1.4.2

Mitigating Controls

Likely Mitigating Controls AI

Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-502

Penetration testing supplies malicious serialized objects, detecting unsafe deserialization and supporting corrective actions.

addresses: CWE-502

Evaluation of untrusted data handling (deserialization testing) reveals unsafe processing, which the required remediation process addresses.

addresses: CWE-502

Untrusted serialized data can be deserialized and observed inside the chamber, blocking gadget-chain exploitation outside the sandbox.

addresses: CWE-502

Validates or rejects untrusted serialized data before deserialization occurs.

addresses: CWE-502

Identifies and blocks malicious code introduced through deserialization of untrusted data at system boundaries.

addresses: CWE-502

Integrity verification of serialized information can detect tampering before deserialization occurs.

addresses: CWE-502

Provenance of associated data allows detection of untrusted sources before deserialization or processing occurs.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-02 none match
blocks

PR.PS-02 addresses only post-deployment updates/patching and cannot prevent introduction of unsafe deserialization code, yet it can remediate some instances when the flaw exists in outdated libraries or components.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

removes
removes
removes
removes
removes

References