CVE-2012-4522
The rb_get_path_check function in file.c in Ruby 1.9.3 before patchlevel 286 and Ruby 2.0.0...
CVE-2012-4522 is a medium vulnerability (CVSS 5.0) in Ruby-lang Ruby, published November 24, 2012. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.20%, the 82nd percentile. Fixed in ruby1.9.1 1.9.2.0-2+deb6u4.
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.
Exploit likelihood
What each source reports
NVD Score used
5.0
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.
- Record
CVE-2012-4522- CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:N/I:P/A:N - Weakness
- CWE-264
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2012-4522- Updated
- 2026-11-02
EUVDEUVD-2012-4450 No score
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.
- Record
EUVD-2012-4450- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-6mch-f8jc-rpmr No score
The rb_get_path_check function in file.c in Ruby 1.9.3 before patchlevel 286 and Ruby 2.0.0...
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.
- Record
GHSA-6mch-f8jc-rpmr- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
ruby1.9.1Debian:6.0 |
before 1.9.2.0-2+deb6u4, plus listed versions 1.9.2.0-21.9.2.0-2+armhf |
1.9.2.0-2+deb6u4 |
rubyRed Hat:enterprise_linux:5::client_workstation |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-debuginfoRed Hat:enterprise_linux:5::client_workstation |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-develRed Hat:enterprise_linux:5::client_workstation |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-modeRed Hat:enterprise_linux:5::client_workstation |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
rubyRed Hat:enterprise_linux:5::client |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-debuginfoRed Hat:enterprise_linux:5::client |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-docsRed Hat:enterprise_linux:5::client |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-irbRed Hat:enterprise_linux:5::client |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-libsRed Hat:enterprise_linux:5::client |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
Show 82 moreShow less
| Package | Affected | Fixed |
|---|---|---|
ruby-rdocRed Hat:enterprise_linux:5::client |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-riRed Hat:enterprise_linux:5::client |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-tcltkRed Hat:enterprise_linux:5::client |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
rubyRed Hat:enterprise_linux:5::server |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-debuginfoRed Hat:enterprise_linux:5::server |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-develRed Hat:enterprise_linux:5::server |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-docsRed Hat:enterprise_linux:5::server |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-irbRed Hat:enterprise_linux:5::server |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-libsRed Hat:enterprise_linux:5::server |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-modeRed Hat:enterprise_linux:5::server |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-rdocRed Hat:enterprise_linux:5::server |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-riRed Hat:enterprise_linux:5::server |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
ruby-tcltkRed Hat:enterprise_linux:5::server |
before 0:1.8.5-27.el5 | 0:1.8.5-27.el5 |
graphvizRed Hat:openshift:1::el6 |
before 0:2.26.0-10.el6 | 0:2.26.0-10.el6 |
graphviz-debuginfoRed Hat:openshift:1::el6 |
before 0:2.26.0-10.el6 | 0:2.26.0-10.el6 |
graphviz-develRed Hat:openshift:1::el6 |
before 0:2.26.0-10.el6 | 0:2.26.0-10.el6 |
graphviz-docRed Hat:openshift:1::el6 |
before 0:2.26.0-10.el6 | 0:2.26.0-10.el6 |
graphviz-gdRed Hat:openshift:1::el6 |
before 0:2.26.0-10.el6 | 0:2.26.0-10.el6 |
graphviz-rubyRed Hat:openshift:1::el6 |
before 0:2.26.0-10.el6 | 0:2.26.0-10.el6 |
openshift-consoleRed Hat:openshift:1::el6 |
before 0:0.0.16-1.el6op | 0:0.0.16-1.el6op |
openshift-origin-brokerRed Hat:openshift:1::el6 |
before 0:1.0.11-1.el6op | 0:1.0.11-1.el6op |
openshift-origin-broker-utilRed Hat:openshift:1::el6 |
before 0:1.0.15-1.el6op | 0:1.0.15-1.el6op |
ruby193-rubyRed Hat:openshift:1::el6 |
before 0:1.9.3.327-25.el6 | 0:1.9.3.327-25.el6 |
ruby193-ruby-debuginfoRed Hat:openshift:1::el6 |
before 0:1.9.3.327-25.el6 | 0:1.9.3.327-25.el6 |
ruby193-ruby-develRed Hat:openshift:1::el6 |
before 0:1.9.3.327-25.el6 | 0:1.9.3.327-25.el6 |
ruby193-ruby-docRed Hat:openshift:1::el6 |
before 0:1.9.3.327-25.el6 | 0:1.9.3.327-25.el6 |
ruby193-ruby-irbRed Hat:openshift:1::el6 |
before 0:1.9.3.327-25.el6 | 0:1.9.3.327-25.el6 |
ruby193-ruby-libsRed Hat:openshift:1::el6 |
before 0:1.9.3.327-25.el6 | 0:1.9.3.327-25.el6 |
ruby193-ruby-tcltkRed Hat:openshift:1::el6 |
before 0:1.9.3.327-25.el6 | 0:1.9.3.327-25.el6 |
ruby193-rubygem-actionpackRed Hat:openshift:1::el6 |
before 1:3.2.8-3.el6 | 1:3.2.8-3.el6 |
ruby193-rubygem-actionpack-docRed Hat:openshift:1::el6 |
before 1:3.2.8-3.el6 | 1:3.2.8-3.el6 |
ruby193-rubygem-activemodelRed Hat:openshift:1::el6 |
before 0:3.2.8-2.el6 | 0:3.2.8-2.el6 |
ruby193-rubygem-activemodel-docRed Hat:openshift:1::el6 |
before 0:3.2.8-2.el6 | 0:3.2.8-2.el6 |
ruby193-rubygem-activerecordRed Hat:openshift:1::el6 |
before 1:3.2.8-3.el6 | 1:3.2.8-3.el6 |
ruby193-rubygem-activerecord-docRed Hat:openshift:1::el6 |
before 1:3.2.8-3.el6 | 1:3.2.8-3.el6 |
ruby193-rubygem-bigdecimalRed Hat:openshift:1::el6 |
before 0:1.1.0-25.el6 | 0:1.1.0-25.el6 |
ruby193-rubygem-io-consoleRed Hat:openshift:1::el6 |
before 0:0.3-25.el6 | 0:0.3-25.el6 |
ruby193-rubygem-jsonRed Hat:openshift:1::el6 |
before 0:1.5.4-25.el6 | 0:1.5.4-25.el6 |
ruby193-rubygem-minitestRed Hat:openshift:1::el6 |
before 0:2.5.1-25.el6 | 0:2.5.1-25.el6 |
ruby193-rubygem-railtiesRed Hat:openshift:1::el6 |
before 0:3.2.8-2.el6 | 0:3.2.8-2.el6 |
ruby193-rubygem-railties-docRed Hat:openshift:1::el6 |
before 0:3.2.8-2.el6 | 0:3.2.8-2.el6 |
ruby193-rubygem-rakeRed Hat:openshift:1::el6 |
before 0:0.9.2.2-25.el6 | 0:0.9.2.2-25.el6 |
ruby193-rubygem-rdocRed Hat:openshift:1::el6 |
before 0:3.9.4-25.el6 | 0:3.9.4-25.el6 |
ruby193-rubygem-ruby_parserRed Hat:openshift:1::el6 |
before 0:2.3.1-3.el6op | 0:2.3.1-3.el6op |
ruby193-rubygem-ruby_parser-docRed Hat:openshift:1::el6 |
before 0:2.3.1-3.el6op | 0:2.3.1-3.el6op |
ruby193-rubygemsRed Hat:openshift:1::el6 |
before 0:1.8.23-25.el6 | 0:1.8.23-25.el6 |
ruby193-rubygems-develRed Hat:openshift:1::el6 |
before 0:1.8.23-25.el6 | 0:1.8.23-25.el6 |
rubygem-actionpackRed Hat:openshift:1::el6 |
before 1:3.0.13-4.el6op | 1:3.0.13-4.el6op |
rubygem-activemodelRed Hat:openshift:1::el6 |
before 0:3.0.13-3.el6op | 0:3.0.13-3.el6op |
rubygem-activemodel-docRed Hat:openshift:1::el6 |
before 0:3.0.13-3.el6op | 0:3.0.13-3.el6op |
rubygem-activerecordRed Hat:openshift:1::el6 |
before 1:3.0.13-5.el6op | 1:3.0.13-5.el6op |
rubygem-bsonRed Hat:openshift:1::el6 |
before 0:1.8.1-2.el6op | 0:1.8.1-2.el6op |
rubygem-mongoRed Hat:openshift:1::el6 |
before 0:1.8.1-2.el6op | 0:1.8.1-2.el6op |
rubygem-mongo-docRed Hat:openshift:1::el6 |
before 0:1.8.1-2.el6op | 0:1.8.1-2.el6op |
rubygem-openshift-origin-auth-remote-userRed Hat:openshift:1::el6 |
before 0:1.0.5-1.el6op | 0:1.0.5-1.el6op |
rubygem-openshift-origin-consoleRed Hat:openshift:1::el6 |
before 0:1.0.10-1.el6op | 0:1.0.10-1.el6op |
rubygem-openshift-origin-console-docRed Hat:openshift:1::el6 |
before 0:1.0.10-1.el6op | 0:1.0.10-1.el6op |
rubygem-openshift-origin-controllerRed Hat:openshift:1::el6 |
before 0:1.0.12-1.el6op | 0:1.0.12-1.el6op |
rubygem-ruby_parserRed Hat:openshift:1::el6 |
before 0:2.0.4-6.el6op | 0:2.0.4-6.el6op |
rubygem-ruby_parser-docRed Hat:openshift:1::el6 |
before 0:2.0.4-6.el6op | 0:2.0.4-6.el6op |
openshift-origin-cartridge-jbosseap-6.0Red Hat:openshift:1::el6 |
before 0:1.0.4-1.el6op | 0:1.0.4-1.el6op |
openshift-origin-cartridge-cron-1.4Red Hat:openshift:1::el6 |
before 0:1.0.3-1.el6op | 0:1.0.3-1.el6op |
openshift-origin-cartridge-diy-0.1Red Hat:openshift:1::el6 |
before 0:1.0.3-1.el6op | 0:1.0.3-1.el6op |
openshift-origin-cartridge-haproxy-1.4Red Hat:openshift:1::el6 |
before 0:1.0.4-1.el6op | 0:1.0.4-1.el6op |
openshift-origin-cartridge-jbossews-1.0Red Hat:openshift:1::el6 |
before 0:1.0.13-1.el6op | 0:1.0.13-1.el6op |
openshift-origin-cartridge-jenkins-1.4Red Hat:openshift:1::el6 |
before 0:1.0.2-1.el6op | 0:1.0.2-1.el6op |
openshift-origin-cartridge-jenkins-client-1.4Red Hat:openshift:1::el6 |
before 0:1.0.2-1.el6op | 0:1.0.2-1.el6op |
openshift-origin-cartridge-mysql-5.1Red Hat:openshift:1::el6 |
before 0:1.0.5-1.el6op | 0:1.0.5-1.el6op |
openshift-origin-cartridge-perl-5.10Red Hat:openshift:1::el6 |
before 0:1.0.3-1.el6op | 0:1.0.3-1.el6op |
openshift-origin-cartridge-php-5.3Red Hat:openshift:1::el6 |
before 0:1.0.5-1.el6op | 0:1.0.5-1.el6op |
openshift-origin-cartridge-postgresql-8.4Red Hat:openshift:1::el6 |
before 0:1.0.3-2.el6op | 0:1.0.3-2.el6op |
openshift-origin-cartridge-ruby-1.8Red Hat:openshift:1::el6 |
before 0:1.0.7-1.el6op | 0:1.0.7-1.el6op |
openshift-origin-cartridge-ruby-1.9-sclRed Hat:openshift:1::el6 |
before 0:1.0.8-1.el6op | 0:1.0.8-1.el6op |
openshift-origin-msg-node-mcollectiveRed Hat:openshift:1::el6 |
before 0:1.0.3-1.el6op | 0:1.0.3-1.el6op |
phpRed Hat:openshift:1::el6 |
before 0:5.3.3-22.el6 | 0:5.3.3-22.el6 |
php-bcmathRed Hat:openshift:1::el6 |
before 0:5.3.3-22.el6 | 0:5.3.3-22.el6 |
php-debuginfoRed Hat:openshift:1::el6 |
before 0:5.3.3-22.el6 | 0:5.3.3-22.el6 |
php-develRed Hat:openshift:1::el6 |
before 0:5.3.3-22.el6 | 0:5.3.3-22.el6 |
php-imapRed Hat:openshift:1::el6 |
before 0:5.3.3-22.el6 | 0:5.3.3-22.el6 |
php-mbstringRed Hat:openshift:1::el6 |
before 0:5.3.3-22.el6 | 0:5.3.3-22.el6 |
php-processRed Hat:openshift:1::el6 |
before 0:5.3.3-22.el6 | 0:5.3.3-22.el6 |
rubygem-openshift-origin-nodeRed Hat:openshift:1::el6 |
before 0:1.0.11-1.el6op | 0:1.0.11-1.el6op |
History
| When | Changed | Sources |
|---|---|---|
| 2026-11-03 | aliases | EUVD |
| 2026-11-02 | created | CVE List, GitHub Advisories, NVD, OSV |
References
lists.fedoraproject.org/pipermail/package-announce/2012-October/090235.html
svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=37163
lists.fedoraproject.org/pipermail/package-announce/2012-October/090515.html
openwall.com/lists/oss-security/2012/10/13/1
rhn.redhat.com/errata/RHSA-2013-0129.html
openwall.com/lists/oss-security/2012/10/16/1
Show 86 moreShow less
openwall.com/lists/oss-security/2012/10/12/6
ruby-lang.org/en/news/2012/10/12/poisoned-NUL-byte-vulnerability
nvd.nist.gov/vuln/detail/CVE-2012-4522
github.com/advisories/GHSA-6mch-f8jc-rpmr
access.redhat.com/errata/RHSA-2013:0129
access.redhat.com/security/updates/classification
rhn.redhat.com/errata/RHSA-2011-0909.html
bugzilla.redhat.com/show_bug.cgi?id=863484
bugzilla.redhat.com/show_bug.cgi?id=865940
security.access.redhat.com/data/csaf/v2/advisories/2013/rhsa-2013_0129.json
access.redhat.com/security/cve/CVE-2012-4481
cve.org/CVERecord?id=CVE-2012-4481
nvd.nist.gov/vuln/detail/CVE-2012-4481
access.redhat.com/security/cve/CVE-2012-4522
cve.org/CVERecord?id=CVE-2012-4522
access.redhat.com/errata/RHSA-2013:0582
access.redhat.com/knowledge/docs
bugzilla.redhat.com/show_bug.cgi?id=827353
bugzilla.redhat.com/show_bug.cgi?id=827363
bugzilla.redhat.com/show_bug.cgi?id=831573
bugzilla.redhat.com/show_bug.cgi?id=831581
bugzilla.redhat.com/show_bug.cgi?id=843711
bugzilla.redhat.com/show_bug.cgi?id=847196
bugzilla.redhat.com/show_bug.cgi?id=847199
bugzilla.redhat.com/show_bug.cgi?id=847200
bugzilla.redhat.com/show_bug.cgi?id=862598
bugzilla.redhat.com/show_bug.cgi?id=862614
bugzilla.redhat.com/show_bug.cgi?id=875236
bugzilla.redhat.com/show_bug.cgi?id=887353
bugzilla.redhat.com/show_bug.cgi?id=889426
bugzilla.redhat.com/show_bug.cgi?id=892806
bugzilla.redhat.com/show_bug.cgi?id=892866
bugzilla.redhat.com/show_bug.cgi?id=895347
bugzilla.redhat.com/show_bug.cgi?id=895355
bugzilla.redhat.com/show_bug.cgi?id=902412
bugzilla.redhat.com/show_bug.cgi?id=902630
bugzilla.redhat.com/show_bug.cgi?id=903526
bugzilla.redhat.com/show_bug.cgi?id=903546
bugzilla.redhat.com/show_bug.cgi?id=905021
bugzilla.redhat.com/show_bug.cgi?id=905656
bugzilla.redhat.com/show_bug.cgi?id=906227
bugzilla.redhat.com/show_bug.cgi?id=906845
security.access.redhat.com/data/csaf/v2/advisories/2013/rhsa-2013_0582.json
access.redhat.com/security/cve/CVE-2012-2660
cve.org/CVERecord?id=CVE-2012-2660
nvd.nist.gov/vuln/detail/CVE-2012-2660
access.redhat.com/security/cve/CVE-2012-2661
cve.org/CVERecord?id=CVE-2012-2661
nvd.nist.gov/vuln/detail/CVE-2012-2661
access.redhat.com/security/cve/CVE-2012-2694
cve.org/CVERecord?id=CVE-2012-2694
nvd.nist.gov/vuln/detail/CVE-2012-2694
access.redhat.com/security/cve/CVE-2012-2695
cve.org/CVERecord?id=CVE-2012-2695
nvd.nist.gov/vuln/detail/CVE-2012-2695
access.redhat.com/security/cve/CVE-2012-3424
cve.org/CVERecord?id=CVE-2012-3424
nvd.nist.gov/vuln/detail/CVE-2012-3424
access.redhat.com/security/cve/CVE-2012-3463
cve.org/CVERecord?id=CVE-2012-3463
nvd.nist.gov/vuln/detail/CVE-2012-3463
access.redhat.com/security/cve/CVE-2012-3464
cve.org/CVERecord?id=CVE-2012-3464
nvd.nist.gov/vuln/detail/CVE-2012-3464
access.redhat.com/security/cve/CVE-2012-3465
cve.org/CVERecord?id=CVE-2012-3465
nvd.nist.gov/vuln/detail/CVE-2012-3465
access.redhat.com/security/cve/CVE-2012-4464
cve.org/CVERecord?id=CVE-2012-4464
nvd.nist.gov/vuln/detail/CVE-2012-4464
access.redhat.com/security/cve/CVE-2012-4466
cve.org/CVERecord?id=CVE-2012-4466
nvd.nist.gov/vuln/detail/CVE-2012-4466
access.redhat.com/security/cve/CVE-2012-5371
cve.org/CVERecord?id=CVE-2012-5371
nvd.nist.gov/vuln/detail/CVE-2012-5371
access.redhat.com/security/cve/CVE-2013-0155
cve.org/CVERecord?id=CVE-2013-0155
nvd.nist.gov/vuln/detail/CVE-2013-0155
access.redhat.com/security/cve/CVE-2013-0162
cve.org/CVERecord?id=CVE-2013-0162
nvd.nist.gov/vuln/detail/CVE-2013-0162
access.redhat.com/security/cve/CVE-2013-0276
bugzilla.redhat.com/show_bug.cgi?id=909528
cve.org/CVERecord?id=CVE-2013-0276
nvd.nist.gov/vuln/detail/CVE-2013-0276