Anti-CSRF Filter Bypass SMF 2.0 / 1.1.14

Anti-CSRF Filter Bypass SMF 2.0 / 1.1.14

Posted on Aug 23 2011   |  Plain text version

Summary

The [img] BBCode tag anti-CSRF filter can be bypassed due to incorrect parsing of the 'action' variable, because of this it is possible to execute CSRF successfully.

Description

Software: Simple Machines Forum (SMF)
Versions: SMF 1.1.14 - 2.0
Publication date: 2011-08-23
Impact: Cross Site Request Forgery
Solution: N/A (Vendor informed)
Websec-id: ws11-15

When a user posts a URL as the source of an [img] tag and it seems malicious, SMF tries to avoid execution of the action parameter by replacing the string "action=something" with "action-something".

If a user makes a specially crafted URL by adding to the end of the variable name a null-byte (%00), the filter is successfully circumvented and CSRF can be achieved.

POC

Remove user 102 from the buddy list (SMF 1.1.14):
[img]http://example.com/index.php?sa=editBuddies;remove=102;action%00=profile[/img]

Logout (SMF 2.0):
[img]http://example.com/community/index.php?action%00=logout;token[/img]

Christian Yerena
cyerena [ at ] websec [ dot ] mx


Latest Blog Entries

Backdoors in Zhone GPON 2520 and Alcatel Lucent I240Q
While examining the "dropbear" binary for the Zhone GPON 2520 and Alcatel Lucent I240Q, we found that both routers have backdoors that allow users with SSH access to connect to these devices with maximum privileges.

Drive By ONT Botnet with IRC C&C
Demonstration of a botnet created purely by using embedded devices which are controlled remotely through vulnerabilities exploited from a webpage.

(IN)secure session data in CodeIgniter
A security analysis on how web applications created with the PHP framework CodeIgniter handle user sessions.

Latest News

Websec present at Campus Party 2014
Websec will be participating with four conferences at the largest Campus Party ever held, which will take place from the 24-29 of June in Guadalajara, Mexico.

Websec at DerbyCon 2013
A summary of Websec's participation at DerbyCon 2013 in Louisville, Kentucky.