Intel

AIKIDO-2026-10857

knplabs/knp-snappy is vulnerable to Arbitrary File Deletion

Arbitrary File DeletionGHSA-87qc-37cw-84h4

38

Low Risk

This Affects:

PHPknplabs/knp-snappy
0.1.0 - 1.7.1
Fixed in 1.7.2
Are you affected? Scan for Free

TL;DR

AbstractGenerator stores temporary cleanup paths in a public $temporaryFiles array and unlinks each entry during cleanup. Code that can modify a Snappy generator instance can add paths outside the temporary directory and cause arbitrary files to be deleted at shutdown. This can turn another bug, such as object injection or access to the generator object, into a file deletion primitive. The fix resolves paths and only deletes files that are inside the configured temporary directory.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

knplabs/knp-snappy is vulnerable to Arbitrary File Deletion in versions 0.1.0 - 1.7.1.

How to fix this

Upgrade the knplabs/knp-snappy library to the patch version.