Ruby vulnerabilities
4 real-world CVEs in Ruby code. Each one is a short hands-on exercise in Hexret: find the vulnerable line, follow the exploit and learn the fix.
- CVE-2023-7028critical 10.02024
GitLab account takeover via password reset
A password-reset request accepts a list of email addresses and delivers the reset token to each, so an attacker adds their own address to a victim's and intercepts the link.
- CVE-2021-22214high 8.62021
GitLab CI lint SSRF
A user-supplied URL is fetched server-side with insufficient validation, so an attacker can make the server request internal systems.
- CVE-2021-22205critical 10.02021
GitLab image-suffix to ExifTool parser mismatch
GitLab selected ExifTool from an upload's image suffix, while ExifTool selected its parser from file content and reached a vulnerable DjVu annotation eval.
- CVE-2013-0156high 7.52013
Rails XML parameter parsing: YAML and Symbol type-cast RCE
An XML request parameter can declare its own type; two of the built-in casts deserialize YAML and intern symbols on attacker input, turning a request into arbitrary object instantiation and remote code execution.