← PHP / Laravel · Contents

PHP-062 / Advanced

Unserializing queue or cache payloads from trusted storage

A08:2021 Software and Data Integrity Failures · CWE-502 Deserialization of Untrusted Data

Why is this a problem?

An attacker with write access to shared storage such as Redis can inject arbitrary objects.

How to fix it

php
// Redis authentication/ACL and network isolation; use JSON serialization for storage where possible

Further reading