RCE via legacy dependency in Python
summary
A small Flask app running in a Python 3.4 container uses PyYAML 3.13 and calls yaml.load on user-provided configs, which allows Python execution and leads to remote code execution. The demo proves this by triggering a webhook.site callback and then spawning a reverse shell via nc to pull confidential files and environment secrets. Snyk flags the dependency (recommend upgrade to 4.2) and static analysis recommends using safe_load; the exploit works end-to-end.
AI-written summary · about
chapters (6)
- 0:00Legacy Python risks
- 3:28Flawed YAML validation
- 11:40PyYAML deserialization exploit
- 18:04Post-exploitation access
- 23:47Static analysis detection
- 27:22Key takeaways
related talks
40mSecuring your dependencies
30mHow to hack an Angular app?
29mHack Your Own Code
52mDevSecOps
18mLive Exploiting Your Open Source Dependencies
43mUnique ways to Hack into a Python Web Service
25mUnexpected Execution: Wild Ways Code Execution can Occur in Python
31mStranger Danger: Addressing Vulnerable CF Application Dependencies
