All Stories
PyPIdata-exposed

A 'helpful' requirements.txt from ChatGPT installed a keylogger on every dev laptop

by sec_leadAug 1, 2026

Context

Junior dev asked ChatGPT to scaffold a Django REST endpoint. It generated a clean requirements.txt including django-rest-helpers.

The Attack

The package hooked into input() and getpass at import time, logging keystrokes to a temp file and exfiltrating on a timer. Every laptop that ran pip install -r requirements.txt got it.

Discovery

Our EDR flagged outbound traffic to an unknown endpoint two days later. By then, half the eng team had typed their passwords into a Django shell.

Aftermath

We rotated every credential. We added a pre-commit hook that runs DevHorrors on every requirements diff. We don't trust AI-generated dependency lists anymore.

Involved package: django-rest-helpersCheck in scanner →
Was this story helpful?