{"id":"CVE-2015-1196","aliases":["DEBIAN-CVE-2015-1196","EUVD-2015-1337","GHSA-pgg8-q7hj-8mg8","MGASA-2015-0068","SUSE-SU-2015:1019-1","UBUNTU-CVE-2015-1196","USN-2651-1","openSUSE-SU-2024:10379-1"],"status":"published","title":"GNU patch 2.7.1 allows remote attackers to write to arbitrary files via a symlink attack in a...","description":"GNU patch 2.7.1 allows remote attackers to write to arbitrary files via a symlink attack in a patch file.","severity":{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.06146,"percentile":0.93507,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-59"],"published":"2015-01-21T00:00:00Z","modified":"2026-09-09T06:47:28Z","fixes":[{"ecosystem":"Debian:12","package":"patch","fixed_in":["2.7.1-7"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"patch","fixed_in":["2.7.1-7"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"patch","fixed_in":["2.7.1-7"],"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.1-7"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"patch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.1-7"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"patch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.1-7"}]}]},{"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},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"patch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.5-1.112"}]}],"bundled":2}],"products":[{"vendor":"gnu","product":"patch"},{"vendor":"opensuse","product":"opensuse"},{"vendor":"oracle","product":"solaris"}],"references":[{"url":"http://git.savannah.gnu.org/cgit/patch.git/commit/?id=4e9269a5fc1fe80a1095a92593dd85db871e1fd3","tags":["x_refsource_CONFIRM","x_transferred","Patch","fix"]},{"url":"http://www.oracle.com/technetwork/topics/security/bulletinjul2015-2511963.html","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1182154","tags":["x_refsource_CONFIRM","x_transferred","Issue Tracking","Third Party Advisory","VDB Entry","advisory","report"]},{"url":"http://www.securityfocus.com/bid/72074","tags":["vdb-entry","x_refsource_BID","x_transferred","Third Party Advisory","advisory"]},{"url":"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775227","tags":["x_refsource_CONFIRM","x_transferred","Exploit","evidence"]},{"url":"http://seclists.org/oss-sec/2015/q1/173","tags":["mailing-list","x_refsource_MLIST","x_transferred","Third Party Advisory","advisory"]},{"url":"http://lists.opensuse.org/opensuse-updates/2015-02/msg00013.html","tags":["vendor-advisory","x_refsource_SUSE","x_transferred","Third Party Advisory","advisory"]},{"url":"https://exchange.xforce.ibmcloud.com/vulnerabilities/99967","tags":["vdb-entry","x_refsource_XF","x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2015-1196"},{"url":"https://github.com/advisories/GHSA-pgg8-q7hj-8mg8"},{"url":"https://security-tracker.debian.org/tracker/CVE-2015-1196","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-1196","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-2651-1","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2015-1196","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-1395","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2015-1396","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2010-4651","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2015-1196","description":"GNU patch 2.7.1 allows remote attackers to write to arbitrary files via a symlink attack in a patch file.","status":"published","published":"2015-01-21T18:00:00Z","modified":"2024-08-06T04:33:20.718Z","updated_at":"2026-11-02T14:35:44.046042Z"}],"euvd":[{"id":"EUVD-2015-1337","description":"GNU patch 2.7.1 allows remote attackers to write to arbitrary files via a symlink attack in a patch file.","status":"published","published":"2015-01-21T18:00:00Z","modified":"2024-08-06T04:33:20Z","updated_at":"2026-11-03T02:22:16.581763Z"}],"ghsa":[{"id":"GHSA-pgg8-q7hj-8mg8","title":"GNU patch 2.7.1 allows remote attackers to write to arbitrary files via a symlink attack in a...","description":"GNU patch 2.7.1 allows remote attackers to write to arbitrary files via a symlink attack in a patch file.","status":"published","published":"2022-05-14T02:06:32Z","modified":"2023-02-02T05:05:26Z","cwes":["CWE-59"],"updated_at":"2026-11-02T14:52:06.598736Z"}],"nvd":[{"id":"CVE-2015-1196","description":"GNU patch 2.7.1 allows remote attackers to write to arbitrary files via a symlink attack in a patch file.","status":"published","published":"2015-01-21T18:59:57.217Z","modified":"2026-06-17T00:21:56.08Z","cvss":[{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-59"],"updated_at":"2026-11-02T14:03:01.643178Z"}],"osv":[{"id":"CVE-2015-1196","description":"GNU patch 2.7.1 allows remote attackers to write to arbitrary files via a symlink attack in a patch file.","status":"published","published":"2015-01-21T18:59:57Z","modified":"2026-04-16T06:15:33.144971169Z","updated_at":"2026-11-02T15:44:00.097545Z"},{"id":"DEBIAN-CVE-2015-1196","description":"GNU patch 2.7.1 allows remote attackers to write to arbitrary files via a symlink attack in a patch file.","status":"published","published":"2015-01-21T18:59:57.217Z","modified":"2026-09-09T06:47:28.06862704Z","updated_at":"2026-11-02T15:45:26.752992Z"},{"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":"openSUSE-SU-2024:10379-1","title":"patch-2.7.5-1.112 on GA media","description":"These are all security issues fixed in the patch-2.7.5-1.112 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2026-02-04T02:38:40.268815Z","updated_at":"2026-11-02T16:58:34.487567Z"},{"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":"UBUNTU-CVE-2015-1196","description":"GNU patch 2.7.1 allows remote attackers to write to arbitrary files via a symlink attack in a patch file.","status":"published","published":"2015-01-21T00:00:00Z","modified":"2026-02-04T02:38:32.875464Z","updated_at":"2026-11-02T15:54:09.721803Z"},{"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"}]}}
