← PHP / Laravel · Contents

PHP-061 / Advanced

Serializing sensitive information into queue-job payloads

A02:2021 Cryptographic Failures · CWE-200 Exposure of Sensitive Information

Why is this a problem?

People with access to Redis or the DB job table can read passwords and tokens.

How to fix it

php
ProcessPayment::dispatch($user->id, $paymentId);   // Pass only IDs and retrieve again in the job

Further reading