CVE-2012-4522 json
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 attacker…
published 2012-11-24 13 y ago modified 2026-06-16 4 mo ago also EUVD-2012-4450
- cvss
- 5.0
- version 2.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.2%
- EPSS 2.2% chance of exploitation in 30 days, percentile 82%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- php openshift 1 5.3.3-22.el6
- graphviz openshift 1 2.26.0-10.el6
- php-imap openshift 1 5.3.3-22.el6
- php-bcmath openshift 1 5.3.3-22.el6
- graphviz-gd openshift 1 2.26.0-10.el6
- php-process openshift 1 5.3.3-22.el6
- php-mbstring openshift 1 5.3.3-22.el6
- ruby193-ruby openshift 1 1.9.3.327-25.el6
red hat advisories RHSA-2013:0582RHSA-2013:0129
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2012-4522 updated cvss 4.3
ruby: unintentional file creation caused by inserting an illegal NUL character
-
Red Hat Enterprise Linux (v. 5 server) ruby 1.8.5-27.el5, ruby-ri 1.8.5-27.el5, ruby-irb 1.8.5-27.el5, ruby-libs 1.8.5-27.el5, ruby-mode 1.8.5-27.el5, ruby-rdoc 1.8.5-27.el5, +1 more Red Hat Enterprise Linux Desktop (v. 5 client) ruby 1.8.5-27.el5, ruby-ri 1.8.5-27.el5, ruby-irb 1.8.5-27.el5, ruby-libs 1.8.5-27.el5, ruby-rdoc 1.8.5-27.el5, ruby-tcltk 1.8.5-27.el5 Red Hat Enterprise Linux Desktop Workstation (v. 5 client) ruby 1.8.5-27.el5, ruby-mode 1.8.5-27.el5fixed: vendor fix RHSA-2013:0129
-
Red Hat OpenShift Enterprise Infrastructure graphviz 2.26.0-10.el6, graphviz-gd 2.26.0-10.el6, rubygem-bson 1.8.1-2.el6op, graphviz-ruby 2.26.0-10.el6, rubygem-mongo 1.8.1-2.el6op, ruby193-ruby 1.9.3.327-25.el6, +25 more Red Hat OpenShift Enterprise JBoss EAP add-on openshift-origin-cartridge-jbosseap-6.0 1.0.4-1.el6op Red Hat OpenShift Enterprise Node php 5.3.3-22.el6, php-imap 5.3.3-22.el6, php-bcmath 5.3.3-22.el6, php-process 5.3.3-22.el6, php-mbstring 5.3.3-22.el6, rubygem-bson 1.8.1-2.el6op, +32 morefixed: vendor fix RHSA-2013:0582
-
Red Hat Enterprise Linux 6 ruby, ruby-ri, ruby-irb, ruby-libs, ruby-rdoc, ruby-tcltknot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
2.20% chance of exploitation in the next 30 days, higher than 82% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
Classification
- Weakness
-
- CWE-264 Permissions, Privileges, and Access Controls
References
-
lists.fedoraproject.org
/pipermail/package-announce/2012-October/090235.html
vendor-advisory
-
lists.fedoraproject.org
/pipermail/package-announce/2012-October/090515.html
vendor-advisory
-
rhn.redhat.com
/errata/RHSA-2013-0129.html
vendor-advisory
- svn.ruby-lang.org /cgi-bin/viewvc.cgi?view=revision&revision=37163
-
openwall.com
/lists/oss-security/2012/10/13/1
mailing-list
-
openwall.com
/lists/oss-security/2012/10/16/1
mailing-list
-
openwall.com
/lists/oss-security/2012/10/12/6
mailing-list
- ruby-lang.org /en/news/2012/10/12/poisoned-NUL-byte-vulnerability/
Sources
- CVE List CVE-2012-4522
- NVD CVE-2012-4522
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.