{"id":"UBUNTU-CVE-2018-12020","details":"mainproc.c in GnuPG before 2.2.8 mishandles the original filename during decryption and verification actions, which allows remote attackers to spoof the output that GnuPG sends on file descriptor 2 to other programs that use the \"--status-fd 2\" option. For example, the OpenPGP data might represent an original filename that contains line feed characters in conjunction with GOODSIG or VALIDSIG status codes.","modified":"2026-05-20T16:03:22.870621998Z","published":"2018-06-08T00:00:00Z","related":["USN-3675-1","USN-3675-2","USN-3675-3","USN-3964-1","USN-4839-1"],"upstream":["CVE-2018-12020"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2018-12020"},{"type":"REPORT","url":"https://dev.gnupg.org/T4012"},{"type":"REPORT","url":"https://lists.gnupg.org/pipermail/gnupg-announce/2018q2/000425.html"},{"type":"REPORT","url":"https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=210e402acd3e284b32db1901e43bf1470e659e49"},{"type":"REPORT","url":"https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=2326851c60793653069494379b16d84e4c10a0ac"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-3675-1"},{"type":"REPORT","url":"https://sourceforge.net/p/enigmail/forum/announce/thread/b948279f/"},{"type":"REPORT","url":"https://neopg.io/blog/gpg-signature-spoof/"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-3675-2"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-3675-3"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-3964-1"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-4839-1"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2018-12020"}],"affected":[{"package":{"name":"gnupg","ecosystem":"Ubuntu:14.04:LTS","purl":"pkg:deb/ubuntu/gnupg?arch=source&distro=trusty"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.16-1ubuntu2.5"}]}],"versions":["1.4.14-1ubuntu2","1.4.15-1.1ubuntu1","1.4.15-1.1ubuntu2","1.4.15-2ubuntu1","1.4.16-1ubuntu1","1.4.16-1ubuntu2","1.4.16-1ubuntu2.1","1.4.16-1ubuntu2.3","1.4.16-1ubuntu2.4"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"gnupg","binary_version":"1.4.16-1ubuntu2.5"},{"binary_name":"gnupg-curl","binary_version":"1.4.16-1ubuntu2.5"},{"binary_name":"gpgv","binary_version":"1.4.16-1ubuntu2.5"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-12020.json"}},{"package":{"name":"gnupg2","ecosystem":"Ubuntu:14.04:LTS","purl":"pkg:deb/ubuntu/gnupg2?arch=source&distro=trusty"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.22-3ubuntu1.4"}]}],"versions":["2.0.20-1ubuntu3","2.0.22-1ubuntu1","2.0.22-3ubuntu1","2.0.22-3ubuntu1.1","2.0.22-3ubuntu1.3"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"gnupg-agent","binary_version":"2.0.22-3ubuntu1.4"},{"binary_name":"gnupg2","binary_version":"2.0.22-3ubuntu1.4"},{"binary_name":"gpgsm","binary_version":"2.0.22-3ubuntu1.4"},{"binary_name":"gpgv2","binary_version":"2.0.22-3ubuntu1.4"},{"binary_name":"scdaemon","binary_version":"2.0.22-3ubuntu1.4"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-12020.json"}},{"package":{"name":"python-gnupg","ecosystem":"Ubuntu:Pro:14.04:LTS","purl":"pkg:deb/ubuntu/python-gnupg?arch=source&distro=trusty%2Fesm"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.3.6-1ubuntu0.1~esm1"}]}],"versions":["0.3.5-2","0.3.6-1"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro","binaries":[{"binary_name":"python-gnupg","binary_version":"0.3.6-1ubuntu0.1~esm1"},{"binary_name":"python3-gnupg","binary_version":"0.3.6-1ubuntu0.1~esm1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-12020.json"}},{"package":{"name":"gnupg","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/gnupg?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.20-1ubuntu3.2"}]}],"versions":["1.4.18-7ubuntu1","1.4.19-6ubuntu1","1.4.20-1ubuntu1","1.4.20-1ubuntu2","1.4.20-1ubuntu3","1.4.20-1ubuntu3.1"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"gnupg","binary_version":"1.4.20-1ubuntu3.2"},{"binary_name":"gnupg-curl","binary_version":"1.4.20-1ubuntu3.2"},{"binary_name":"gpgv","binary_version":"1.4.20-1ubuntu3.2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-12020.json"}},{"package":{"name":"gnupg2","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/gnupg2?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.11-6ubuntu2.1"}]}],"versions":["2.0.28-3ubuntu1","2.0.28-3ubuntu2","2.1.11-6ubuntu1","2.1.11-6ubuntu2"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"dirmngr","binary_version":"2.1.11-6ubuntu2.1"},{"binary_name":"gnupg-agent","binary_version":"2.1.11-6ubuntu2.1"},{"binary_name":"gnupg2","binary_version":"2.1.11-6ubuntu2.1"},{"binary_name":"gpgsm","binary_version":"2.1.11-6ubuntu2.1"},{"binary_name":"gpgv2","binary_version":"2.1.11-6ubuntu2.1"},{"binary_name":"scdaemon","binary_version":"2.1.11-6ubuntu2.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-12020.json"}},{"package":{"name":"python-gnupg","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/python-gnupg?arch=source&distro=esm-apps%2Fxenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.3.8-2ubuntu0.1~esm1"}]}],"versions":["0.3.7-2","0.3.8-1","0.3.8-2"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_name":"python-gnupg","binary_version":"0.3.8-2ubuntu0.1~esm1"},{"binary_name":"python3-gnupg","binary_version":"0.3.8-2ubuntu0.1~esm1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-12020.json"}},{"package":{"name":"enigmail","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/enigmail?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2:1.8.2-0ubuntu1","2:1.8.2-4fakesync1","2:1.9.1-1","2:1.9.7-1~ubuntu0.16.04.1","2:1.9.9-0ubuntu0.16.04.1","2:2.0.3-0ubuntu2~16.04.1","2:2.0.6-0ubuntu1~16.04.1","2:2.0.7-0ubuntu1~16.04.1","2:2.0.8-1~ubuntu0.16.04.2","2:2.1.6+ds1-1~ubuntu0.16.04.1"],"ecosystem_specific":{"binaries":[{"binary_name":"enigmail","binary_version":"2:2.1.6+ds1-1~ubuntu0.16.04.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-12020.json"}},{"package":{"name":"gnupg2","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/gnupg2?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.4-1ubuntu1.1"}]}],"versions":["2.1.15-1ubuntu8","2.2.4-1ubuntu1"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"dirmngr","binary_version":"2.2.4-1ubuntu1.1"},{"binary_name":"gnupg","binary_version":"2.2.4-1ubuntu1.1"},{"binary_name":"gnupg-agent","binary_version":"2.2.4-1ubuntu1.1"},{"binary_name":"gnupg-l10n","binary_version":"2.2.4-1ubuntu1.1"},{"binary_name":"gnupg-utils","binary_version":"2.2.4-1ubuntu1.1"},{"binary_name":"gnupg2","binary_version":"2.2.4-1ubuntu1.1"},{"binary_name":"gpg","binary_version":"2.2.4-1ubuntu1.1"},{"binary_name":"gpg-agent","binary_version":"2.2.4-1ubuntu1.1"},{"binary_name":"gpg-wks-client","binary_version":"2.2.4-1ubuntu1.1"},{"binary_name":"gpg-wks-server","binary_version":"2.2.4-1ubuntu1.1"},{"binary_name":"gpgconf","binary_version":"2.2.4-1ubuntu1.1"},{"binary_name":"gpgsm","binary_version":"2.2.4-1ubuntu1.1"},{"binary_name":"gpgv","binary_version":"2.2.4-1ubuntu1.1"},{"binary_name":"gpgv-static","binary_version":"2.2.4-1ubuntu1.1"},{"binary_name":"gpgv-win32","binary_version":"2.2.4-1ubuntu1.1"},{"binary_name":"gpgv2","binary_version":"2.2.4-1ubuntu1.1"},{"binary_name":"scdaemon","binary_version":"2.2.4-1ubuntu1.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-12020.json"}},{"package":{"name":"python-gnupg","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/python-gnupg?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.4.1-1ubuntu1.18.04.1"}]}],"versions":["0.3.9-1","0.4.1-1ubuntu1"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"python-gnupg","binary_version":"0.4.1-1ubuntu1.18.04.1"},{"binary_name":"python3-gnupg","binary_version":"0.4.1-1ubuntu1.18.04.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-12020.json"}},{"package":{"name":"enigmail","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/enigmail?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2:1.9.8.3-1","2:1.9.9-1","2:1.9.9-2","2:2.0.3-0ubuntu2~18.04.1","2:2.0.6-0ubuntu1~18.04.1","2:2.0.7-0ubuntu1~18.04.1","2:2.0.8-1~ubuntu0.18.04.2","2:2.1.2-0ubuntu1~18.04.2","2:2.1.6+ds1-1~ubuntu0.18.04.1","2:2.2.4-0ubuntu0.18.04.1"],"ecosystem_specific":{"binaries":[{"binary_name":"enigmail","binary_version":"2:2.2.4-0ubuntu0.18.04.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-12020.json"}},{"package":{"name":"gnupg1","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/gnupg1?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.4.22-1ubuntu1","1.4.22-3ubuntu1","1.4.22-3ubuntu2"],"ecosystem_specific":{"binaries":[{"binary_name":"gnupg1","binary_version":"1.4.22-3ubuntu2"},{"binary_name":"gnupg1-l10n","binary_version":"1.4.22-3ubuntu2"},{"binary_name":"gpgv1","binary_version":"1.4.22-3ubuntu2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-12020.json"}},{"package":{"name":"enigmail","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/enigmail?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2:2.1.2-0ubuntu1","2:2.1.3+ds1-3","2:2.1.3+ds1-4","2:2.1.5+ds1-1","2:2.1.6+ds1-1","2:2.2.4-0ubuntu0.20.04.1"],"ecosystem_specific":{"binaries":[{"binary_name":"enigmail","binary_version":"2:2.2.4-0ubuntu0.20.04.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-12020.json"}},{"package":{"name":"enigmail","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/enigmail?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2:2.2.4-0.3"],"ecosystem_specific":{"binaries":[{"binary_name":"enigmail","binary_version":"2:2.2.4-0.3"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-12020.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"},{"type":"Ubuntu","score":"medium"}]}