{"dataType": "CVE_RECORD", "containers": {"adp": [{"metrics": [{"cvssV2_0": {"version": "2.0", "baseScore": 4.3, "accessVector": "NETWORK", "vectorString": "AV:N/AC:M/Au:N/C:N/I:P/A:N", "authentication": "NONE", "integrityImpact": "PARTIAL", "accessComplexity": "MEDIUM", "availabilityImpact": "NONE", "confidentialityImpact": "NONE"}}, {"other": {"type": "Unknown", "content": {"data": "{\"description\":\"MODERATE\"}"}}}], "affected": [{"vendor": "oraclelinux", "product": "ruby", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:oracle:linux:5"], "defaultStatus": "unaffected"}, {"vendor": "oraclelinux", "product": "ruby-devel", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:oracle:linux:5"], "defaultStatus": "unaffected"}, {"vendor": "oraclelinux", "product": "ruby-docs", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:oracle:linux:5"], "defaultStatus": "unaffected"}, {"vendor": "oraclelinux", "product": "ruby-irb", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:oracle:linux:5"], "defaultStatus": "unaffected"}, {"vendor": "oraclelinux", "product": "ruby-libs", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:oracle:linux:5"], "defaultStatus": "unaffected"}, {"vendor": "oraclelinux", "product": "ruby-mode", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:oracle:linux:5"], "defaultStatus": "unaffected"}, {"vendor": "oraclelinux", "product": "ruby-rdoc", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:oracle:linux:5"], "defaultStatus": "unaffected"}, {"vendor": "oraclelinux", "product": "ruby-ri", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:oracle:linux:5"], "defaultStatus": "unaffected"}, {"vendor": "oraclelinux", "product": "ruby-tcltk", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:oracle:linux:5"], "defaultStatus": "unaffected"}], "references": [{"url": "https://linux.oracle.com/cve/CVE-2012-4522.html"}], "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."}], "providerMetadata": {"orgId": "00000000-0000-4000-A000-000000000006", "shortName": "oraclelinux", "dateUpdated": "2013-01-11T00:00:00Z", "x_subShortName": "oraclelinux"}}, {"metrics": [{"cvssV2_0": {"version": "2.0", "baseScore": 4.3, "accessVector": "NETWORK", "vectorString": "AV:N/AC:M/Au:N/C:N/I:P/A:N", "authentication": "NONE", "integrityImpact": "PARTIAL", "accessComplexity": "MEDIUM", "availabilityImpact": "NONE", "confidentialityImpact": "NONE"}}, {"other": {"type": "Unknown", "content": {"data": "{\"description\":\"Moderate\"}"}}}], "affected": [{"vendor": "redhat", "product": "ruby", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:redhat:enterprise_linux:5"], "defaultStatus": "unaffected"}, {"vendor": "redhat", "product": "ruby-devel", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:redhat:enterprise_linux:5"], "defaultStatus": "unaffected"}, {"vendor": "redhat", "product": "ruby-docs", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:redhat:enterprise_linux:5"], "defaultStatus": "unaffected"}, {"vendor": "redhat", "product": "ruby-irb", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:redhat:enterprise_linux:5"], "defaultStatus": "unaffected"}, {"vendor": "redhat", "product": "ruby-libs", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:redhat:enterprise_linux:5"], "defaultStatus": "unaffected"}, {"vendor": "redhat", "product": "ruby-mode", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:redhat:enterprise_linux:5"], "defaultStatus": "unaffected"}, {"vendor": "redhat", "product": "ruby-rdoc", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:redhat:enterprise_linux:5"], "defaultStatus": "unaffected"}, {"vendor": "redhat", "product": "ruby-ri", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:redhat:enterprise_linux:5"], "defaultStatus": "unaffected"}, {"vendor": "redhat", "product": "ruby-tcltk", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.5-27.el5", "versionType": "rpm"}], "platforms": ["cpe:/o:redhat:enterprise_linux:5"], "defaultStatus": "unaffected"}], "references": [{"url": "https://access.redhat.com/errata/RHSA-2013:0129"}, {"url": "https://access.redhat.com/security/cve/CVE-2012-4522"}], "descriptions": [{"lang": "en", "value": "Ruby is an extensible, interpreted, object-oriented, scripting language. It\nhas features to process text files and to do system management tasks.\n\nIt was found that certain methods did not sanitize file names before\npassing them to lower layer routines in Ruby. If a Ruby application created\nfiles with names based on untrusted input, it could result in the creation\nof files with different names than expected. (CVE-2012-4522)\n\nIt was found that the RHSA-2011:0909 update did not correctly fix the\nCVE-2011-1005 issue, a flaw in the method for translating an exception\nmessage into a string in the Exception class. A remote attacker could use\nthis flaw to bypass safe level 4 restrictions, allowing untrusted (tainted)\ncode to modify arbitrary, trusted (untainted) strings, which safe level 4\nrestrictions would otherwise prevent. (CVE-2012-4481)\n\nThe CVE-2012-4481 issue was discovered by Vit Ondruch of Red Hat.\n\nThis update also fixes the following bug:\n\n* Prior to this update, the \"rb_syck_mktime\" option could, under certain\ncircumstances, terminate with a segmentation fault when installing\nlibraries with certain gems. This update modifies the underlying code so\nthat Ruby gems can be installed as expected. (BZ#834381)\n\nAll users of Ruby are advised to upgrade to these updated packages, which\ncontain backported patches to resolve these issues."}], "providerMetadata": {"orgId": "53f830b8-0a3f-465b-8143-3b8a9948e749", "shortName": "redhat", "dateUpdated": "2012-10-12T00:00:00Z", "x_subShortName": "redhat_5"}}, {"metrics": [{"cvssV2_0": {"version": "2.0", "baseScore": 4.3, "accessVector": "NETWORK", "vectorString": "AV:N/AC:M/Au:N/C:N/I:P/A:N", "authentication": "NONE", "integrityImpact": "PARTIAL", "accessComplexity": "MEDIUM", "availabilityImpact": "NONE", "confidentialityImpact": "NONE"}}, {"other": {"type": "Unknown", "content": {"data": "{\"description\":\"Moderate\"}"}}}], "affected": [{"vendor": "redhat", "product": "ruby", "platforms": ["cpe:/o:redhat:enterprise_linux:6"], "defaultStatus": "unaffected"}, {"vendor": "redhat", "product": "ruby-devel", "platforms": ["cpe:/o:redhat:enterprise_linux:6"], "defaultStatus": "unaffected"}, {"vendor": "redhat", "product": "ruby-docs", "platforms": ["cpe:/o:redhat:enterprise_linux:6"], "defaultStatus": "unaffected"}, {"vendor": "redhat", "product": "ruby-irb", "platforms": ["cpe:/o:redhat:enterprise_linux:6"], "defaultStatus": "unaffected"}, {"vendor": "redhat", "product": "ruby-libs", "platforms": ["cpe:/o:redhat:enterprise_linux:6"], "defaultStatus": "unaffected"}, {"vendor": "redhat", "product": "ruby-rdoc", "platforms": ["cpe:/o:redhat:enterprise_linux:6"], "defaultStatus": "unaffected"}, {"vendor": "redhat", "product": "ruby-ri", "platforms": ["cpe:/o:redhat:enterprise_linux:6"], "defaultStatus": "unaffected"}, {"vendor": "redhat", "product": "ruby-static", "platforms": ["cpe:/o:redhat:enterprise_linux:6"], "defaultStatus": "unaffected"}, {"vendor": "redhat", "product": "ruby-tcltk", "platforms": ["cpe:/o:redhat:enterprise_linux:6"], "defaultStatus": "unaffected"}], "references": [{"url": "https://access.redhat.com/security/cve/CVE-2012-4522"}], "descriptions": [{"lang": "en", "value": "Red Hat's versions of the associated software have been determined to NOT be affected by CVE-2012-4522."}], "providerMetadata": {"orgId": "53f830b8-0a3f-465b-8143-3b8a9948e749", "shortName": "redhat", "dateUpdated": "2012-10-12T00:00:00Z", "x_subShortName": "redhat_6"}}, {"metrics": [{"other": {"type": "Unknown", "content": {"data": "{\"description\":\"Moderate\"}"}}}], "affected": [{"vendor": "suse", "product": "ruby", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.7.p357-0.9.9.1", "versionType": "rpm"}], "platforms": ["cpe:/o:suse:sled:11:sp2"], "defaultStatus": "unaffected"}], "solutions": [{"lang": "en", "value": "SUSE bug 791199"}], "references": [{"url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-4522", "name": "Mitre CVE-2012-4522"}, {"url": "https://www.suse.com/security/cve/CVE-2012-4522", "name": "SUSE CVE-2012-4522"}, {"url": "https://lists.suse.com/pipermail/sle-security-updates/2013-March/000371.html", "name": "SUSE-SU-2013:0435-1"}, {"url": "https://lists.suse.com/pipermail/sle-security-updates/2013-April/000409.html", "name": "SUSE-SU-2013:0611-1"}, {"url": "https://lists.opensuse.org/opensuse-updates/2013-03/msg00002.html", "name": "openSUSE-SU-2013:0376-1"}], "descriptions": [{"lang": "en", "value": "\n    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.\n    "}], "providerMetadata": {"orgId": "404e59f5-483d-4b8a-8e7a-e67604dd8afb", "shortName": "suse", "dateUpdated": "2021-04-30T00:00:00Z", "x_subShortName": "suse_desktop_11"}}, {"metrics": [{"other": {"type": "Unknown", "content": {"data": "{\"description\":\"Moderate\"}"}}}], "affected": [{"vendor": "suse", "product": "ruby", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.7.p357-0.9.9.1", "versionType": "rpm"}], "platforms": ["cpe:/o:suse:sles:11:sp1", "cpe:/o:suse:sles:11:sp2", "cpe:/o:suse:sles_sap:11:sp2"], "defaultStatus": "unaffected"}, {"vendor": "suse", "product": "ruby-doc-html", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.7.p357-0.9.9.1", "versionType": "rpm"}], "platforms": ["cpe:/o:suse:sles:11:sp1", "cpe:/o:suse:sles:11:sp2", "cpe:/o:suse:sles_sap:11:sp2"], "defaultStatus": "unaffected"}, {"vendor": "suse", "product": "ruby-tk", "versions": [{"status": "affected", "version": "0", "lessThan": "0:1.8.7.p357-0.9.9.1", "versionType": "rpm"}], "platforms": ["cpe:/o:suse:sles:11:sp1", "cpe:/o:suse:sles:11:sp2", "cpe:/o:suse:sles_sap:11:sp2"], "defaultStatus": "unaffected"}], "solutions": [{"lang": "en", "value": "SUSE bug 791199"}], "references": [{"url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-4522", "name": "Mitre CVE-2012-4522"}, {"url": "https://www.suse.com/security/cve/CVE-2012-4522", "name": "SUSE CVE-2012-4522"}, {"url": "https://lists.suse.com/pipermail/sle-security-updates/2013-March/000371.html", "name": "SUSE-SU-2013:0435-1"}, {"url": "https://lists.suse.com/pipermail/sle-security-updates/2013-April/000409.html", "name": "SUSE-SU-2013:0611-1"}], "descriptions": [{"lang": "en", "value": "\n    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.\n    "}], "providerMetadata": {"orgId": "404e59f5-483d-4b8a-8e7a-e67604dd8afb", "shortName": "suse", "dateUpdated": "2022-03-01T00:00:00Z", "x_subShortName": "suse_server_11"}}], "cna": {"metrics": [{"format": "CVSS", "cvssV2_0": {"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"}}], "affected": [{"cpes": ["cpe:2.3:a:ruby-lang:ruby:1.9.3:*:*:*:*:*:*:*", "cpe:2.3:a:ruby-lang:ruby:2.0.0:*:*:*:*:*:*:*"], "vendor": "ruby-lang", "product": "ruby", "versions": [{"status": "affected", "version": "1.9.3"}, {"status": "affected", "version": "2.0.0"}], "defaultStatus": "unaffected"}], "references": [{"url": "http://lists.fedoraproject.org/pipermail/package-announce/2012-October/090235.html"}, {"url": "http://lists.fedoraproject.org/pipermail/package-announce/2012-October/090515.html"}, {"url": "http://rhn.redhat.com/errata/RHSA-2013-0129.html"}, {"url": "http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=37163"}, {"url": "http://www.openwall.com/lists/oss-security/2012/10/12/6"}, {"url": "http://www.openwall.com/lists/oss-security/2012/10/13/1"}, {"url": "http://www.openwall.com/lists/oss-security/2012/10/16/1"}, {"url": "http://www.ruby-lang.org/en/news/2012/10/12/poisoned-NUL-byte-vulnerability/"}], "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."}], "problemTypes": [{"descriptions": [{"lang": "en", "cweId": "CWE-264", "description": "CWE-264"}]}], "providerMetadata": {"orgId": "00000000-0000-4000-A000-000000000003", "shortName": "nvd", "dateUpdated": "2012-11-24T20:55:03Z", "x_subShortName": "nvd"}}}, "cveMetadata": {"cveId": "CVE-2012-4522", "state": "PUBLISHED", "dateUpdated": "2025-04-11T00:51:21Z", "assignerOrgId": "53f830b8-0a3f-465b-8143-3b8a9948e749", "datePublished": "2012-11-24T20:55:03Z", "assignerShortName": "redhat"}, "dataVersion": "5.0"}