CVE-2012-4522
Status: ModifiedMedium (5)—
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.
CVSS
- Version: 2.0
- Vector: AV:N/AC:L/Au:N/C:N/I:P/A:N
- Base score: 5
Exploitation probability (EPSS)
- Probability of exploitation in the next 30 days: 2.20%
- Percentile among all scored CVEs: 82
- Score date: 10/5/2026
EPSS (Exploit Prediction Scoring System, FIRST) estimates how likely a vulnerability is to be exploited in the wild within 30 days. It complements CVSS (impact) and CISA KEV (confirmed exploitation).
Affected technologies (1)
CWEs
- CWE-264
References
- http://lists.fedoraproject.org/pipermail/package-announce/2012-October/090235.html
- http://lists.fedoraproject.org/pipermail/package-announce/2012-October/090515.html
- http://rhn.redhat.com/errata/RHSA-2013-0129.html
- http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=37163
- http://www.openwall.com/lists/oss-security/2012/10/12/6
- http://www.openwall.com/lists/oss-security/2012/10/13/1
- http://www.openwall.com/lists/oss-security/2012/10/16/1
- http://www.ruby-lang.org/en/news/2012/10/12/poisoned-NUL-byte-vulnerability/
- http://lists.fedoraproject.org/pipermail/package-announce/2012-October/090235.html
- http://lists.fedoraproject.org/pipermail/package-announce/2012-October/090515.html
- http://rhn.redhat.com/errata/RHSA-2013-0129.html
- http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=37163
- http://www.openwall.com/lists/oss-security/2012/10/12/6
- http://www.openwall.com/lists/oss-security/2012/10/13/1
- http://www.openwall.com/lists/oss-security/2012/10/16/1
- http://www.ruby-lang.org/en/news/2012/10/12/poisoned-NUL-byte-vulnerability/
Raw JSON (NVD)
Show
{
"id": "CVE-2012-4522",
"cveTags": [],
"metrics": {
"cvssMetricV2": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"version": "2.0",
"baseScore": 5,
"accessVector": "NETWORK",
"vectorString": "AV:N/AC:L/Au:N/C:N/I:P/A:N",
"authentication": "NONE",
"integrityImpact": "PARTIAL",
"accessComplexity": "LOW",
"availabilityImpact": "NONE",
"confidentialityImpact": "NONE"
},
"acInsufInfo": false,
"impactScore": 2.9,
"baseSeverity": "MEDIUM",
"obtainAllPrivilege": false,
"exploitabilityScore": 10,
"obtainUserPrivilege": false,
"obtainOtherPrivilege": false,
"userInteractionRequired": false
}
]
},
"affected": [
{
"source": "secalert@redhat.com",
"affectedData": [
{
"vendor": "n/a",
"product": "n/a",
"versions": [
{
"status": "affected",
"version": "n/a"
}
]
}
]
}
],
"published": "2012-11-24T20:55:03.150",
"references": [
{
"url": "http://lists.fedoraproject.org/pipermail/package-announce/2012-October/090235.html",
"source": "secalert@redhat.com"
},
{
"url": "http://lists.fedoraproject.org/pipermail/package-announce/2012-October/090515.html",
"source": "secalert@redhat.com"
},
{
"url": "http://rhn.redhat.com/errata/RHSA-2013-0129.html",
"source": "secalert@redhat.com"
},
{
"url": "http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=37163",
"source": "secalert@redhat.com"
},
{
"url": "http://www.openwall.com/lists/oss-security/2012/10/12/6",
"source": "secalert@redhat.com"
},
{
"url": "http://www.openwall.com/lists/oss-security/2012/10/13/1",
"source": "secalert@redhat.com"
},
{
"url": "http://www.openwall.com/lists/oss-security/2012/10/16/1",
"source": "secalert@redhat.com"
},
{
"url": "http://www.ruby-lang.org/en/news/2012/10/12/poisoned-NUL-byte-vulnerability/",
"source": "secalert@redhat.com"
},
{
"url": "http://lists.fedoraproject.org/pipermail/package-announce/2012-October/090235.html",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://lists.fedoraproject.org/pipermail/package-announce/2012-October/090515.html",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://rhn.redhat.com/errata/RHSA-2013-0129.html",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=37163",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://www.openwall.com/lists/oss-security/2012/10/12/6",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://www.openwall.com/lists/oss-security/2012/10/13/1",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://www.openwall.com/lists/oss-security/2012/10/16/1",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://www.ruby-lang.org/en/news/2012/10/12/poisoned-NUL-byte-vulnerability/",
"source": "af854a3a-2127-422b-91ae-364da2661108"
}
],
"vulnStatus": "Modified",
"weaknesses": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"description": [
{
"lang": "en",
"value": "CWE-264"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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."
},
{
"lang": "es",
"value": "La función rb_get_path_check en file.c en Ruby v1.9.3 anterior a patchlevel 286 y Ruby v2.0.0 anterior a r37163 permite a atacantes dependientes de contexto crear archivos en ubicaciones inesperadas o con nombres inesperados a través de un byte NUL en una ruta de archivo."
}
],
"lastModified": "2026-06-16T23:45:15.250",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:ruby-lang:ruby:1.9.3:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "D0535DC9-EB0E-4745-80AC-4A020DF26E38"
},
{
"criteria": "cpe:2.3:a:ruby-lang:ruby:2.0.0:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "B03B7561-A854-4EFA-9E4E-CFC4EEAE4EE1"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "secalert@redhat.com"
}