搜索
查看: 564|回复: 0

WordPress <= 4.2 - Stored XSS

[复制链接]

1839

主题

2255

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
11913
发表于 2015-4-29 22:38:12 | 显示全部楼层 |阅读模式
  1. Source: http://klikki.fi/adv/wordpress2.html


  2. ## Overview
  3. Current versions of WordPress are vulnerable to a stored xss.  An unauthenticated attacker can inject JavaScript in
  4. WordPress comments. The script is triggered when the comment is viewed.

  5. If triggered by a logged-in administrator, under default settings the attacker can leverage the vulnerability to
  6. execute arbitrary code on the server via the plugin and theme editors.

  7. Alternatively the attacker could change the administrator’s password, create new administrator accounts,
  8. or do whatever else the currently logged-in administrator can do on the target system.



  9. ## Details
  10. If the comment text is long enough, it will be truncated when inserted in the database.
  11. The Mysql TEXT type size limit is 64 kilobytes, so the comment has to be quite long.

  12. The truncation results in malformed HTML generated on the page.
  13. The attacker can supply any attributes in the allowed HTML tags, in the same way
  14. as with the two recently published stored XSS vulnerabilities affecting the WordPress core.

  15. The vulnerability bears a similarity to the one reported by Cedric Van Bockhaven in
  16. 2014 (patched this week, after 14 months). Instead of using an invalid character to truncate
  17. the comment, this time an excessively long comment is used for the same effect.

  18. In these two cases, the injected JavaScript apparently can't be triggered in the
  19. administrative Dashboard so these exploits seem to require getting around comment
  20. moderation e.g. by posting one harmless comment first.

  21. The similar vulnerability released by Klikki in November 2014 could be exploited in the
  22. administrative Dashboard while the comment is still in the moderation queue. Some
  23. exploit attempts of this have been recently reported in the wild.



  24. ## Proof of Concept
  25. Enter as a comment text:

  26.   <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>

  27. Confirmed vulnerable: WordPress 4.2, 4.1.2, 4.1.1, 3.9.3.
  28. Tested with MySQL versions 5.1.53 and 5.5.41.



  29. ## Demo
  30. https://www.youtube.com/watch?v=OCqQZJZ1Ie4
复制代码
过段时间可能会取消签到功能了
您需要登录后才可以回帖 登录 | Join BUC

本版积分规则

Powered by Discuz!

© 2012-2015 Baiker Union of China.

快速回复 返回顶部 返回列表