{"exploit":{"id":"EDB-36844","name":"WordPress Core 4.2 - Stored Cross-Site Scripting (XSS)","description":"WordPress Core 4.2 - Stored Cross-Site Scripting (XSS)","cves":["CVE-2015-3440"],"author":"klikki","published":"2015-04-27","platform":"php","type":"webapps","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/36844","path":"exploits/php/webapps/36844.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-36844.txt","vulnerabilities":[{"id":"CVE-2015-3440","state":"PUBLISHED","title":null,"titleSource":null,"description":"Cross-site scripting (XSS) vulnerability in wp-includes/wp-db.php in WordPress before 4.2.1 allows remote attackers to inject arbitrary web script or HTML via a long comment that is improperly stored because of limitations on the MySQL TEXT data type.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2015-3440","cvss":{"version":"2.0","baseScore":4.3,"severity":"medium","vectorString":"AV:N/AC:M/Au:N/C:N/I:P/A:N","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2015-3440"},"updatedAt":"2024-08-06T05:47:57.700Z","retrievedAt":"2026-11-27T04:10:31.586Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-36844.png?v=2","url":"https://exploitbin.com/exploits/EDB-36844","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-36844/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-36844/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"Source: http://klikki.fi/adv/wordpress2.html\n\n\n## Overview\nCurrent versions of WordPress are vulnerable to a stored XSS.  An unauthenticated attacker can inject JavaScript in\nWordPress comments. The script is triggered when the comment is viewed.\n\nIf triggered by a logged-in administrator, under default settings the attacker can leverage the vulnerability to\nexecute arbitrary code on the server via the plugin and theme editors.\n\nAlternatively the attacker could change the administrator’s password, create new administrator accounts,\nor do whatever else the currently logged-in administrator can do on the target system.\n\n\n\n## Details\nIf the comment text is long enough, it will be truncated when inserted in the database.\nThe MySQL TEXT type size limit is 64 kilobytes, so the comment has to be quite long.\n\nThe truncation results in malformed HTML generated on the page.\nThe attacker can supply any attributes in the allowed HTML tags, in the same way\nas with the two recently published stored XSS vulnerabilities affecting the WordPress core.\n\nThe vulnerability bears a similarity to the one reported by Cedric Van Bockhaven in\n2014 (patched this week, after 14 months). Instead of using an invalid character to truncate\nthe comment, this time an excessively long comment is used for the same effect.\n\nIn these two cases, the injected JavaScript apparently can't be triggered in the\nadministrative Dashboard so these exploits seem to require getting around comment\nmoderation e.g. by posting one harmless comment first.\n\nThe similar vulnerability released by Klikki in November 2014 could be exploited in the\nadministrative Dashboard while the comment is still in the moderation queue. Some\nexploit attempts of this have been recently reported in the wild.\n\n\n\n## Proof of Concept\nEnter as a comment text:\n\n  <a title='x onmouseover=alert(unescape(/hello%20world/.source)) style=position:absolute;left:0;top:0;width:5000px;height:5000px  AAAAAAAAAAAA...[64 kb]..AAA'></a>\n\nConfirmed vulnerable: WordPress 4.2, 4.1.2, 4.1.1, 3.9.3.\nTested with MySQL versions 5.1.53 and 5.5.41.\n\n\n\n## Demo\nhttps://www.youtube.com/watch?v=OCqQZJZ1Ie4","sha256":"80dac65dab7b8f991919bae8acf0b6e13f87c1655098c24f87c6f1378cfef402","bytes":2139,"fetchedAt":"2026-11-27T04:10:31.256Z","encoding":"utf-8 (display only; download retains original bytes)"}