Go vulnerabilities
4 real-world CVEs in Go code. Each one is a short hands-on exercise in Hexret: find the vulnerable line, follow the exploit and learn the fix.
- CVE-2024-21626high 8.62024
Leaky Vessels: runc leaked-fd working-directory container escape (CVE-2024-21626)
runc marks stray inherited file descriptors close-on-exec but then enters the workload's requested working directory before they are actually closed, so a cwd of /proc/self/fd/N re-enters a still-open host directory handle and the process escapes onto the host filesystem.
- CVE-2022-24348high 7.72022
Argo CD Helm value-file path traversal
A containment check on Helm value-file paths runs only when the path fails to parse as a URI, so a client-supplied absolute path parses cleanly, skips the check, and reads files from outside the repository root.
- CVE-2021-30465high 8.52021
runc mount-destination symlink race (container escape)
A bind-mount destination is resolved and confined once, then the mount syscall re-walks it as a string, so a racing symlink swap redirects the mount outside the container and bind-mounts the host filesystem in.
- CVE-2019-14271critical 9.82019
Docker cp container escape via untrusted libnss load (CVE-2019-14271)
The docker cp helper chroots into the container, then a routine archive walk resolves file owners and glibc's NSS facility lazily loads libnss modules from inside that container filesystem, so a trojaned libnss runs as root on the host.