PoC Watch
REDCap unauthenticated code injection
Exploited in the wildCritical 9.8
Crafted requests from a public survey context reach an unintended controller route and inject code during data import, letting an unauthenticated attacker run code on the server. A valid public survey hash is required, and public surveys hand those out by design. Observed attacks installed a cryptominer disguised as a system logging process, with cron and SSH key persistence. CISA added it to KEV on November 18. See the REDCap consortium advisory for fixed versions.
Mitigation by layer
Patch
- Upgrade REDCap to the fixed version named in the vendor's security advisory. Institutions get this through the REDCap consortium, not a public download.
Reduce exposure
- If you cannot patch immediately, consider taking public surveys offline or restricting them to your institution's network until you can.
Harden access
- Make sure the web server user cannot write outside REDCap's designated upload and temp directories, and that those directories do not execute scripts.
Detect
- Check for the persistence reported in these attacks.
Step by step
- Review cron entries for the web server user (often www-data or apache).
sudo crontab -l -u <web-user> - Look for SSH keys that should not exist for that user.
sudo ls -la ~<web-user>/.ssh/ 2>/dev/null - Check whether a process calling itself syslog-ng is running from somewhere other than the system package path, and investigate sustained high CPU.
ps -eo pid,user,pcpu,args --sort=-pcpu | head -n 15
- Review cron entries for the web server user (often www-data or apache).
Contain and recover
- REDCap holds research and often patient data. If you find evidence of compromise, isolate the server, preserve it for forensics, and involve your privacy office early.