{"exploit":{"id":"EDB-7902","name":"Amaya Web Editor 11.0 - XML / HTML Parser","description":"Amaya Web Editor 11.0 - XML / HTML Parser","cves":["CVE-2009-0323"],"author":"Core Security","published":"2009-01-28","platform":"windows","type":"dos","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/7902","path":"exploits/windows/dos/7902.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-7902.txt","vulnerabilities":[{"id":"CVE-2009-0323","state":"PUBLISHED","title":null,"titleSource":null,"description":"Multiple stack-based buffer overflows in W3C Amaya Web Browser 10.0 and 11.0 allow remote attackers to execute arbitrary code via (1) a long type parameter in an input tag, which is not properly handled by the EndOfXmlAttributeValue function; (2) an \"HTML GI\" in a start tag, which is not properly handled by the ProcessStartGI function; and unspecified vectors in (3) html2thot.c and (4) xml2thot.c, related to the msgBuffer variable. NOTE: these are different vectors than CVE-2008-6005.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2009-0323","cvss":{"version":"2.0","baseScore":10,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2009-0323"},"updatedAt":"2024-08-07T04:31:25.549Z","retrievedAt":"2026-11-26T13:08:51.787Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-7902.png?v=2","url":"https://exploitbin.com/exploits/EDB-7902","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-7902/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-7902/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\n      Core Security Technologies - CoreLabs Advisory\n           http://www.coresecurity.com/corelabs/\n\nAmaya web editor XML and HTML parser vulnerabilities\n\n\n\n1. *Advisory Information*\n\nTitle: Amaya web editor XML and HTML parser vulnerabilities\nAdvisory ID: CORE-2008-1211\nAdvisory URL: http://www.coresecurity.com/content/amaya-buffer-overflows\nDate published: 2009-01-28\nDate of last update: 2009-01-26\nVendors contacted: INRIA\nRelease mode: Coordinated release\n\n\n2. *Vulnerability Information*\n\nClass: Buffer overflow\nRemotely Exploitable: Yes\nLocally Exploitable: No\nBugtraq ID: 33046, 33047\nCVE Name: N/A\n\n\n3. *Vulnerability Description*\n\nAmaya is the W3C's Web editor/browser, a tool used to create and update\ndocuments directly on the Web. Multiple stack buffer overflow\nvulnerabilities have been discovered in Amaya, which can be exploited by\nunauthorized people using crafted web pages to compromise a user's system.\n\n\n4. *Vulnerable packages*\n\n   . Amaya 11.0 and previous versions.\n\n\n5. *Non-vulnerable packages*\n\n   . Amaya 11.1.\n\n\n6. *Vendor Information, Solutions and Workarounds*\n\nPatched versions should be downloadable from Amaya's web site [1].\n\n\n7. *Credits*\n\nThese vulnerabilities were discovered and researched by Dan Crowley and\nAlfredo Ortega from Core Security Technologies.\n\n\n8. *Technical Description / Proof of Concept Code*\n\nMultiple stack buffer overflow vulnerabilities have been discovered in\nAmaya web editor/browser [1], which can be exploited by unauthorized\npeople using crafted web pages to compromise a user's system.\n\nA boundary error when processing 'input' HTML tags can be exploited to\ncause a stack-based buffer overflow via an overly long 'type' parameter\n(Bugtraq ID 33046). Code analysis of the Amaya XHTML parser reveals\nmultiple unchecked buffers declared on the stack, one of which is used\nin the function 'EndOfXmlAttributeValue()':\n\n/-----------\n\nXml2thot.c\n\n3247\tstatic void EndOfXmlAttributeValue (char *attrValue)\n3248\n3249\t{\n3250\t  AttributeType    attrType;\n3251\t  int            attrKind, val;\n3252\t  unsigned char    msgBuffer[MaxMsgLength];\n3253\n\n.\n.\n.\n3265\t      if (val <= 0)\n3266\t        {\n3267\t          sprintf ((char *)msgBuffer,\n3268\t                   \"Unknown attribute value \\\"%s\\\"\", (char\n*)attrValue);\n3269\t          XmlParseError (errorParsing, (unsigned char *)msgBuffer,\n0);\n3270        }\n\n\n- -----------/\n\n\n\nWe can see here that the 'sprintf' function at line 3267 will write on\nthe buffer 'msgBuffer' if there is an error, but it will never check\nthat the error message fits the length of that buffer, so if the\nattribute exceeds a length of about 170 characters, a buffer overflow\nwill ensue.\n\nThe following page consisting of a single HTML tag is enough to trigger\nthis vulnerability. This code will control the instruction pointer,\ncausing the Amaya web editor program to jump to the address '0x41414141':\n\n/-----------\n\n<input\ntype=\"aBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBCDaBAAAA\">\n\n- -----------/\n\n\n\nOther stack-based buffer overflows were discovered.\n\nWhen reading the HTML in function 'EndOfStartGI()', the length of the\nvariable 'theGI' is correctly limited to the buffer length.\n\n/-----------\n\nhtml2toth.c:\n\n2506\n/*----------------------------------------------------------------------\n2507\t  EndOfStartGI    An HTML GI has been read in a start tag.\n2508\n- ----------------------------------------------------------------------*/\n2509\tstatic void     EndOfStartGI (char c)\n2510\t{\n2511\t  char        theGI[MaxMsgLength];\n.\n.\n.\n2538\t      strncpy ((char *)theGI, (char *)inputBuffer, MaxMsgLength - 1);\n2539\t      theGI[MaxMsgLength - 1] = EOS\n.\n.\n.\n2596\t        ProcessStartGI (theGI);\n\n- -----------/\n\n But when calling 'ProcessStartGI()', an error message will add 50 extra\ncharacters to this variable (line 2440), and a stack-based buffer\noverflow will ensue (Bugtraq ID 33047):\n\n/-----------\n\n2321\n/*----------------------------------------------------------------------\n2322\t  ProcessStartGI  An HTML GI has been read in a start tag.\n2323\t  Create the corresponding Thot thing (element, attribute,\n2324\t  or character), according to the mapping table.\n2325\n- ----------------------------------------------------------------------*/\n2326\tstatic void ProcessStartGI (const char* GIname)\n2327\t{\n2331\t  char                msgBuffer[MaxMsgLength];\n\n.\n.\n.\n\n2436\t          if (error)\n2437\t            /* element not allowed in the current structural context */\n2438\t            {\n2439\t              /* send an error message */\n2440\t              sprintf (msgBuffer,\n2441\t                       \"Tag <%s> is not allowed here (removed when\nsaving)\",\n2442\t                       GIname);\n2443\t              HTMLParseError (HTMLcontext.doc, msgBuffer, 0);\n\n\n- -----------/\n\n This is not an exhaustive enumeration of the stack-based buffer\noverflows that can be found in Amaya. Remarkably, in the unpatched\nversion, files 'html2thot.c' and 'xml2thot.c' contain many general\npurpose buffers defined as\n\n/-----------\n\nchar msgBuffer[MaxMsgLength]\n- -----------/\n\n and the length of buffers is generally not checked in the functions\nusing them (i.e. 'strcpy', 'sprintf', etcetera).\n\n\n9. *Report Timeline*\n\n. 2008-12-18: Core notifies the vendor of the vulnerability.\n. 2008-12-19: Vendor requests information about versions tested.\n. 2008-12-19: Core notifies the vendor that the vulnerability was tested\non Amaya 11.0 and 10.0 (Windows XP).\n. 2008-12-29: Core offers to send the advisory draft to the vendor and\noffers to negotiate the publication date.\n. 2009-01-08: Core sends the advisory draft to the vendor.\n. 2009-01-09: Vendor informs that the bugs were fixed in the CVS version\nand will be included in version 11.1 by the end of January.\n. 2009-01-12: Core requests a more precise date.\n. 2009-01-14: Vendor suggest to publish the advisory on January 28th at\nthe same time of release of Amaya 11.1.\n. 2009-01-14: Core confirms the vendor that advisory CORE-2008-1211 will\nbe published on January 28th.\n. 2009-01-28: Core publishes advisory CORE-2008-1211.\n\n\n10. *References*\n\n[1] Amaya Homepage http://www.w3.org/Amaya\n\n\n11. *About CoreLabs*\n\nCoreLabs, the research center of Core Security Technologies, is charged\nwith anticipating the future needs and requirements for information\nsecurity technologies. We conduct our research in several important\nareas of computer security including system vulnerabilities, cyber\nattack planning and simulation, source code auditing, and cryptography.\nOur results include problem formalization, identification of\nvulnerabilities, novel solutions and prototypes for new technologies.\nCoreLabs regularly publishes security advisories, technical papers,\nproject information and shared software tools for public use at:\nhttp://www.coresecurity.com/corelabs.\n\n\n12. *About Core Security Technologies*\n\nCore Security Technologies develops strategic solutions that help\nsecurity-conscious organizations worldwide develop and maintain a\nproactive process for securing their networks. The company's flagship\nproduct, CORE IMPACT, is the most comprehensive product for performing\nenterprise security assurance testing. CORE IMPACT evaluates network,\nendpoint and end-user vulnerabilities and identifies what resources are\nexposed. It enables organizations to determine if current security\ninvestments are detecting and preventing attacks. Core Security\nTechnologies augments its leading technology solution with world-class\nsecurity consulting services, including penetration testing and software\nsecurity auditing. Based in Boston, MA and Buenos Aires, Argentina, Core\nSecurity Technologies can be reached at 617-399-6980 or on the Web at\nhttp://www.coresecurity.com.\n\n\n13. *Disclaimer*\n\nThe contents of this advisory are copyright (c) 2009 Core Security\nTechnologies and (c) 2009 CoreLabs, and may be distributed freely\nprovided that no fee is charged for this distribution and proper credit\nis given.\n\n\n14. *PGP/GPG Keys*\n\nThis advisory has been signed with the GPG key of Core Security\nTechnologies advisories team, which is available for download at\nhttp://www.coresecurity.com/files/attachments/core_security_advisories.asc.\n\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.6 (MingW32)\nComment: Using GnuPG with Mozilla - http://enigmail.mozdev.org\n\niD8DBQFJgKLpyNibggitWa0RAmNOAKCT1Mxhe8VysinqBnwAtbuuhAaedgCeOWL6\nDWuJPZIBvcK5lINLAJ2ylR8=\n=X9Dw\n-----END PGP SIGNATURE-----\n\n# milw0rm.com [2009-01-28]","sha256":"8f34366b4bb0f7146e3c82a607c8429bcb0e8922675b44fead0b69003945dd54","bytes":8595,"fetchedAt":"2026-11-26T13:08:47.066Z","encoding":"utf-8 (display only; download retains original bytes)"}