{"exploit":{"id":"EDB-47002","name":"Thunderbird ESR < 60.7.XXX - 'icalmemorystrdupanddequote' Heap-Based Buffer Overflow","description":"Thunderbird ESR < 60.7.XXX - 'icalmemorystrdupanddequote' Heap-Based Buffer Overflow","cves":["CVE-2019-11704"],"author":"X41 D-Sec GmbH","published":"2019-06-17","platform":"multiple","type":"dos","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/47002","path":"exploits/multiple/dos/47002.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-47002.txt","vulnerabilities":[{"id":"CVE-2019-11704","state":"PUBLISHED","title":null,"titleSource":null,"description":"A flaw in Thunderbird's implementation of iCal causes a heap buffer overflow in icalmemory_strdup_and_dequote when processing certain email messages, resulting in a potentially exploitable crash. This vulnerability affects Thunderbird < 60.7.1.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2019-11704","cvss":{"version":"3.1","baseScore":9.8,"severity":"critical","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2019-11704"},"updatedAt":"2024-08-04T23:03:32.479Z","retrievedAt":"2026-11-26T09:07:20.503Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-47002.png?v=2","url":"https://exploitbin.com/exploits/EDB-47002","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-47002/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-47002/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"X41 D-Sec GmbH Security Advisory: X41-2019-001\n\nHeap-based buffer overflow in Thunderbird\n=========================================\nSeverity Rating: High\nConfirmed Affected Versions: All versions affected\nConfirmed Patched Versions: Thunderbird ESR 60.7.XXX\nVendor: Thunderbird\nVendor URL: https://www.thunderbird.net/\nVendor Reference: https://bugzilla.mozilla.org/show_bug.cgi?id=1553814\nVector: Incoming mail with calendar attachment\nCredit: X41 D-SEC GmbH, Luis Merino\nStatus: Public\nCVE: CVE-2019-11704\nCWE: 122\nCVSS Score: 7.8\nCVSS Vector: CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H/E:U/RL:O\nAdvisory-URL: https://www.x41-dsec.de/lab/advisories/x41-2019-001-thunderbird\n\nSummary and Impact\n==================\nA heap-based buffer overflow has been identified in the Thunderbird email\nclient. The issue is present in the libical implementation, which was forked\nfrom upstream libical version 0.47.\nThe issue can be triggered remotely, when an attacker sends an specially\ncrafted calendar attachment and does not require user interaction. It\nmight be used by a remote attacker to crash or gain remote code execution\nin the client system.\nThis issue was initially reported by Brandon Perry here:\nhttps://bugzilla.mozilla.org/show_bug.cgi?id=1280832\nand fixed in libical upstream, but was never fixed in Thunderbird.\nX41 did not perform a full test or audit on the software.\n\nProduct Description\n===================\nThunderbird is a free and open source email, newsfeed, chat, and calendaring\nclient, that's easy to set up and customize.\n\nAnalysis\n========\nA heap-based buffer overflow in icalvalue.c icalmemory_strdup_and_dequote()\ncan be triggered while parsing a calendar attachment containing a malformed\nor specially crafted string.\n{% highlight c %}\nstatic char *icalmemorystrdupanddequote(const char *str)\n{\n    char *out = (char *)malloc(sizeof(char) * strlen(str) + 1);\n    char *pout = out;\n    // ...\n    for (p = str; *p!=0; p++){\n        if( *p == '\\')\n        {\n            p++;\n        // ...\n        else\n    {\n            *pout = *p;\n    }\n    }\n{% endhighlight %}\nBounds checking in `icalmemorystrdupanddequote()can be bypassed when the\ninputp` ends with a backslash, which enables an attacker to read out of bounds\nof the input buffer and writing out of bounds of a heap-allocated output buffer.\nThe issue manifests in several ways, including out of bounds read and write,\nnull-pointer dereference and frequently leads to heap corruption.\nIt is expected that an attacker can exploit this vulnerability to achieve\nremote code execution.\n\nProof of Concept\n================\nA reproducer eml file can be found in https://github.com/x41sec/advisories/tree/master/X41-2019-001\n\nWorkarounds\n===========\nA fix is available from upstream. Alternatively, libical can be replaced by icaljs,\na JavaScript implementation of ical parsing, by setting\ncalendar.icaljs = true in Thunderbird configuration.\n\nTimeline\n========\n2016-06-19 Issue reported by Brandon Perry to the vendor\n2019-05-23 Issue reported by X41 D-SEC to the vendor\n2019-05-23 Vendor reply\n2019-06-12 CVE IDs assigned\n2019-06-13 Patched Version released\n2019-06-13 Advisory released\n\nAbout X41 D-SEC GmbH\n====================\nX41 is an expert provider for application security services.\nHaving extensive industry experience and expertise in the area of information\nsecurity, a strong core security team of world class security experts enables\nX41 to perform premium security services.\nFields of expertise in the area of application security are security centered\ncode reviews, binary reverse engineering and vulnerability discovery.\nCustom research and a IT security consulting and support services are core\ncompetencies of X41.\n\n\nProof of Concept:\nhttps://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/47002.zip","sha256":"289d44112ddb65032f7b1a43bbe1e1c7e5b0e11338edc4801f75c372aedc580a","bytes":3813,"fetchedAt":"2026-11-26T16:10:25.162Z","encoding":"utf-8 (display only; download retains original bytes)"}