{"vuid":"VU#403051","idnumber":"403051","name":"GnuPG format string vulnerability in do_get() in ttyio.c while prompting for a new filename","keywords":["GnuPG","GPG","format string","vfprintf() function","%s","do_get","ttyio.c"],"overview":"There is a format string vulnerability in GNU Privacy Guard. By sending a GPG message with a carefully crafted malicious filename, an attacker may be able to execute arbitrary code as the user who decrypts the message.","clean_desc":"GNU Privacy Guard (GPG) is a free, RFC2440 compliant replacement for Pretty Good Privacy (PGP). A format string vulnerability occurs in the do_get() function in ttyio.c, where GnuPG calls tty_printf() with a user supplied format string. When GPG encounters a filename with an unknown suffix, and it is not in batch mode, it prompts the user for a new filename to write the decrypted results to. The default value (which is included in the prompt) is the existing filename. Note that the filename is embedded in the encrypted message itself, and that safe file names selected by the recipient is not sufficient to protect against this attack. If the filename embedded in the message contains printf style format characters, the message creator may be able to execute arbitrary code as the user who decrypts the message.","impact":"An attacker may be able to execute arbitrary code as the user decrypting the message.","resolution":"Apply a patch from your vendor GNU Privacy Guard version 1.0.6 corrects this problem. Many vendors have published security advisories and released updated distributions correcting the vulnerability.","workarounds":"Decrypt files in batch mode Because the vulnerable code is not called when GnuPG is in batch mode, users may be able to work around the vulnerability by specifying --batch on the command line.","sysaffected":"","thanks":"Thanks to Fish Stiqz for discovering this vulnerability.","author":"This document was written by Cory F. Cohen.","public":["http://www.gnupg.org/whatsnew.html#rn20010529","http://www.securityfocus.com/bid/2797","http://www.securityfocus.com/archive/1/187352","http://www.i.cz/en/onas/tisk4.html","http://linuxtoday.com/news_story.php3?ltsn=2001-05-30-015-20-SC-PD","http://www.redhat.com/support/errata/RHSA-2001-073.html","http://lists.suse.com/archive/suse-security-announce/2001-Jun/0000.html","http://www.turbolinux.com/pipermail/tl-security-announce/2001-June/000439.html","http://www.mandrakesecure.net/en/advisories/2001/MDKSA-2001-053-1.php3?dis=8.1","http://lists.debian.org/debian-security-announce/debian-security-announce-2001/msg00064.html","http://www.caldera.com/support/security/advisories/CSSA-2001-020.1.txt","http://www.trustix.org/pipermail/tsl-announce/2001-June/000011.html","http://xforce.iss.net/static/6642.php"],"cveids":["CVE-2001-0522"],"certadvisory":"","uscerttechnicalalert":null,"datecreated":"2001-07-17T17:35:36Z","publicdate":"2001-05-29T00:00:00Z","datefirstpublished":"2001-12-10T20:24:01Z","dateupdated":"2003-11-05T21:29:47Z","revision":10,"vrda_d1_directreport":"","vrda_d1_population":"","vrda_d1_impact":"","cam_widelyknown":"15","cam_exploitation":"0","cam_internetinfrastructure":"5","cam_population":"15","cam_impact":"15","cam_easeofexploitation":"13","cam_attackeraccessrequired":"20","cam_scorecurrent":"21.9375","cam_scorecurrentwidelyknown":"27.421875","cam_scorecurrentwidelyknownexploited":"49.359375","ipprotocol":"","cvss_accessvector":"","cvss_accesscomplexity":"","cvss_authentication":null,"cvss_confidentialityimpact":"","cvss_integrityimpact":"","cvss_availabilityimpact":"","cvss_exploitablity":null,"cvss_remediationlevel":"","cvss_reportconfidence":"","cvss_collateraldamagepotential":"","cvss_targetdistribution":"","cvss_securityrequirementscr":"","cvss_securityrequirementsir":"","cvss_securityrequirementsar":"","cvss_basescore":"","cvss_basevector":"","cvss_temporalscore":"","cvss_environmentalscore":"","cvss_environmentalvector":"","metric":21.9375,"vulnote":null}