{"id":"CVE-2015-1395","aliases":["DEBIAN-CVE-2015-1395","EUVD-2015-1532","GHSA-97xh-wvxp-9m89","MGASA-2015-0068","SUSE-SU-2015:1019-1","UBUNTU-CVE-2015-1395","USN-2651-1"],"status":"published","title":"Directory traversal vulnerability in GNU patch versions which support Git-style patching before 2...","description":"Directory traversal vulnerability in GNU patch versions which support Git-style patching before 2.7.3 allows remote attackers to write to arbitrary files with the permissions of the target user via a .. (dot dot) in a diff file name.","severity":{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.11289,"percentile":0.96001,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-22"],"published":"2015-01-28T00:00:00Z","modified":"2026-09-09T07:00:03Z","fixes":[{"ecosystem":"Debian:12","package":"patch","fixed_in":["2.7.3-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"patch","fixed_in":["2.7.3-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"patch","fixed_in":["2.7.3-1"],"sources":["osv"]},{"ecosystem":"Ubuntu:14.04:LTS","package":"patch","fixed_in":["2.7.1-4ubuntu2.3"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"patch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.3-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"patch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.3-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"patch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.3-1"}]}]},{"source":"osv","ecosystem":"Mageia:4","package":"patch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.4-1.mga4"}]}],"bundled":3},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Desktop 12","package":"patch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.5-7.1"}]}],"bundled":3},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server 12","package":"patch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.5-7.1"}]}],"bundled":3},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 12","package":"patch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.5-7.1"}]}],"bundled":3},{"source":"osv","ecosystem":"Ubuntu:14.04:LTS","package":"patch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.1-4ubuntu2.3"}]}],"versions":["2.7.1-3","2.7.1-4","2.7.1-4ubuntu1","2.7.1-4ubuntu2"]},{"source":"osv","ecosystem":"Ubuntu:14.04:LTS","package":"patch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.1-4ubuntu2.3"}]}],"versions":["2.7.1-3","2.7.1-4","2.7.1-4ubuntu1","2.7.1-4ubuntu2"],"bundled":5}],"products":[{"vendor":"canonical","product":"ubuntu_linux"},{"vendor":"fedoraproject","product":"fedora"},{"vendor":"gnu","product":"patch"}],"references":[{"url":"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775873","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Patch","Third Party Advisory","advisory","fix","report"]},{"url":"http://www.securityfocus.com/bid/72846","tags":["vdb-entry","x_refsource_BID","x_transferred","Third Party Advisory","VDB Entry","advisory"]},{"url":"http://lists.fedoraproject.org/pipermail/package-announce/2015-January/148953.html","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","Patch","Third Party Advisory","advisory","fix"]},{"url":"https://savannah.gnu.org/bugs/?44059","tags":["x_refsource_CONFIRM","x_transferred","Patch","Vendor Advisory","advisory","fix"]},{"url":"http://www.openwall.com/lists/oss-security/2015/01/27/28","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Patch","Third Party Advisory","advisory","article","fix"]},{"url":"https://git.savannah.gnu.org/cgit/patch.git/commit/?id=17953b5893f7c9835f0dd2a704ba04e0371d2cbd","tags":["x_refsource_CONFIRM","x_transferred","Issue Tracking","Patch","fix","report"]},{"url":"http://lists.fedoraproject.org/pipermail/package-announce/2015-April/154214.html","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","Patch","Third Party Advisory","advisory","fix"]},{"url":"http://www.ubuntu.com/usn/USN-2651-1","tags":["vendor-advisory","x_refsource_UBUNTU","x_transferred","Patch","Third Party Advisory","advisory","fix"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1184490","tags":["x_refsource_CONFIRM","x_transferred","Issue Tracking","Patch","Third Party Advisory","advisory","fix","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2015-1395"},{"url":"https://github.com/advisories/GHSA-97xh-wvxp-9m89"},{"url":"https://security-tracker.debian.org/tracker/CVE-2015-1395","tags":["advisory"]},{"url":"https://advisories.mageia.org/MGASA-2015-0068.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=15142","tags":["report"]},{"url":"https://lists.fedoraproject.org/pipermail/package-announce/2015-January/148953.html","tags":["web"]},{"url":"https://lists.fedoraproject.org/pipermail/package-announce/2015-February/149140.html","tags":["web"]},{"url":"https://www.suse.com/support/update/announcement/2015/suse-su-20151019-1/","tags":["advisory"]},{"url":"https://bugzilla.suse.com/904519","tags":["report"]},{"url":"https://bugzilla.suse.com/913678","tags":["report"]},{"url":"https://bugzilla.suse.com/915328","tags":["report"]},{"url":"https://bugzilla.suse.com/915329","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2015-1196","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2015-1395","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2015-1396","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2015-1395","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-2651-1","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2015-1395","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2010-4651","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2014-9637","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2015-1196","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2015-1396","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2015-1395","description":"Directory traversal vulnerability in GNU patch versions which support Git-style patching before 2.7.3 allows remote attackers to write to arbitrary files with the permissions of the target user via a .. (dot dot) in a diff file name.","status":"published","published":"2017-08-25T18:00:00Z","modified":"2024-08-06T04:40:18.688Z","updated_at":"2026-11-02T14:35:43.698357Z"}],"euvd":[{"id":"EUVD-2015-1532","description":"Directory traversal vulnerability in GNU patch versions which support Git-style patching before 2.7.3 allows remote attackers to write to arbitrary files with the permissions of the target user via a .. (dot dot) in a diff file name.","status":"published","published":"2017-08-25T18:00:00Z","modified":"2024-08-06T04:40:18Z","updated_at":"2026-11-03T02:22:15.605684Z"}],"ghsa":[{"id":"GHSA-97xh-wvxp-9m89","title":"Directory traversal vulnerability in GNU patch versions which support Git-style patching before 2...","description":"Directory traversal vulnerability in GNU patch versions which support Git-style patching before 2.7.3 allows remote attackers to write to arbitrary files with the permissions of the target user via a .. (dot dot) in a diff file name.","status":"published","published":"2022-05-17T01:22:46Z","modified":"2023-02-03T05:03:47Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:53:25.886002Z"}],"nvd":[{"id":"CVE-2015-1395","description":"Directory traversal vulnerability in GNU patch versions which support Git-style patching before 2.7.3 allows remote attackers to write to arbitrary files with the permissions of the target user via a .. (dot dot) in a diff file name.","status":"published","published":"2017-08-25T18:29:00.59Z","modified":"2026-06-17T00:22:21.41Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high","assessor":"primary"},{"version":"2.0","score":7.8,"vector":"AV:N/AC:L/Au:N/C:N/I:C/A:N","level":"high","assessor":"primary"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:03:17.730372Z"}],"osv":[{"id":"CVE-2015-1395","description":"Directory traversal vulnerability in GNU patch versions which support Git-style patching before 2.7.3 allows remote attackers to write to arbitrary files with the permissions of the target user via a .. (dot dot) in a diff file name.","status":"published","published":"2017-08-25T18:29:00Z","modified":"2026-04-16T06:16:05.6721339Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"updated_at":"2026-11-02T15:44:00.097545Z"},{"id":"DEBIAN-CVE-2015-1395","description":"Directory traversal vulnerability in GNU patch versions which support Git-style patching before 2.7.3 allows remote attackers to write to arbitrary files with the permissions of the target user via a .. (dot dot) in a diff file name.","status":"published","published":"2017-08-25T18:29:00.59Z","modified":"2026-09-09T07:00:03.579597954Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"updated_at":"2026-11-02T15:45:26.752992Z"},{"id":"UBUNTU-CVE-2015-1395","description":"Directory traversal vulnerability in GNU patch versions which support Git-style patching before 2.7.3 allows remote attackers to write to arbitrary files with the permissions of the target user via a .. (dot dot) in a diff file name.","status":"published","published":"2015-01-28T00:00:00Z","modified":"2026-02-04T03:20:09.426323Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"updated_at":"2026-11-02T15:54:09.721803Z"},{"id":"MGASA-2015-0068","title":"Updated patch packages fix security vulnerabilities","description":"Updated patch package fixes security vulnerabilities:\n\nIt was reported that a crafted diff file can make patch eat memory and later\nsegfault (CVE-2014-9637).\n\nIt was reported that the versions of the patch utility that support Git-style\npatches are vulnerable to a directory traversal flaw. This could allow an\nattacker to overwrite arbitrary files by applying a specially crafted patch,\nwith the privileges of the user running patch (CVE-2015-1395).\n\nGNU patch before 2.7.4 allows remote attackers to write to arbitrary files via\na symlink attack in a patch file (CVE-2015-1196).\n","status":"published","published":"2015-02-17T18:38:13Z","modified":"2026-04-16T06:24:47.269069126Z","updated_at":"2026-11-02T15:49:39.488462Z"},{"id":"SUSE-SU-2015:1019-1","title":"Security update for patch","description":"The GNU patch utility was updated to 2.7.5 to fix three security issues and one non-security bug.\n\nThe following vulnerabilities were fixed:\n\n* CVE-2015-1196: directory traversal flaw when handling git-style patches. This could allow an attacker to overwrite arbitrary files by tricking the user into applying a specially crafted patch. (bsc#913678)\n* CVE-2015-1395: directory traversal flaw when handling patches which rename files. This could allow an attacker to overwrite arbitrary files by tricking the user into applying a specially crafted patch. (bsc#915328) \n* CVE-2015-1396: directory traversal flaw via symbolic links. This could allow an attacker to overwrite arbitrary files by tricking the user into applying a by applying a specially crafted patch. (bsc#915329)\n\nThe following bug was fixed:\n\n* bsc#904519:  Function names in hunks (from diff -p) are now preserved in  reject files.\n","status":"published","published":"2015-06-03T12:13:47Z","modified":"2026-02-04T04:24:50.376113Z","updated_at":"2026-11-02T15:53:41.276824Z"},{"id":"USN-2651-1","title":"patch vulnerabilities","description":"Jakub Wilk discovered that GNU patch did not correctly handle file paths in\npatch files. An attacker could specially craft a patch file that could\noverwrite arbitrary files with the privileges of the user invoking the program.\nThis issue only affected Ubuntu 12.04 LTS. (CVE-2010-4651)\n\nLászló Böszörményi discovered that GNU patch did not correctly handle some\npatch files. An attacker could specially craft a patch file that could cause a\ndenial of service. (CVE-2014-9637)\n\nJakub Wilk discovered that GNU patch did not correctly handle symbolic links in\ngit style patch files. An attacker could specially craft a patch file that\ncould overwrite arbitrary files with the privileges of the user invoking the\nprogram. This issue only affected Ubuntu 14.04 LTS and Ubuntu 14.10.\n(CVE-2015-1196)\n\nJakub Wilk discovered that GNU patch did not correctly handle file renames in\ngit style patch files. An attacker could specially craft a patch file that\ncould overwrite arbitrary files with the privileges of the user invoking the\nprogram. This issue only affected Ubuntu 14.04 LTS and Ubuntu 14.10.\n(CVE-2015-1395)\n\nJakub Wilk discovered the fix for CVE-2015-1196 was incomplete for GNU patch.\nAn attacker could specially craft a patch file that could overwrite arbitrary\nfiles with the privileges of the user invoking the program. This issue only\naffected Ubuntu 14.04 LTS and Ubuntu 14.10. (CVE-2015-1396)\n","status":"published","published":"2015-06-22T23:50:54Z","modified":"2026-02-10T04:40:54Z","updated_at":"2026-11-02T16:58:09.227524Z"}]}}
