Vulnerabilities · 2012 · Ruby-lang
CVE-2012-4522
Ruby-lang Ruby vulnerability
The rb_get_path_check function in file.c in Ruby 1.9.3 before patchlevel 286 and Ruby 2.0.0 before r37163 allows context-dependent attackers to create files in unexpected locations or with unexpected names via a NUL byte in a file path.
Affected products
Ruby. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Ruby-lang Ruby runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- lists.fedoraproject.org/pipermail/package-announce/2012-October/090235.html
- lists.fedoraproject.org/pipermail/package-announce/2012-October/090515.html
- rhn.redhat.com/errata/RHSA-2013-0129.html
- svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=37163
- www.openwall.com/lists/oss-security/2012/10/12/6
- www.openwall.com/lists/oss-security/2012/10/13/1
- www.openwall.com/lists/oss-security/2012/10/16/1
- www.ruby-lang.org/en/news/2012/10/12/poisoned-NUL-byte-vulnerability/
- nvd.nist.gov/vuln/detail/CVE-2012-4522
- cve.org/CVERecord?id=CVE-2012-4522
More vulnerabilities in Ruby-lang products
CVE-2026-46727CVE-2025-58767CVE-2025-43857CVE-2025-27788CVE-2025-27221CVE-2025-27220CVE-2025-27219CVE-2025-6442All 115
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.