☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Ckeditor logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 8.2 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:L 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2021-41164

CVE-2021-41164 — Advanced Content Filter (ACF) vulnerability allowing to execute JavaScript code using malformed HTML
📅 PUBLISHED: 2021-11-17 00:00 UTC 🔄 UPDATED: 2026-10-02 19:27 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: CONFIRMED — 3+ independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 1.35%
👁️
1.35% probability
33.6× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1059.007
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: Poland License: Open Source
Affected: Ckeditor — upgrade to patched release
CVSS VECTOR BREAKDOWN 8.2
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: R User Interaction Required
S: C Scope Changed
C: H Confidentiality High
I: L Integrity Low
A: L Availability Low
8.2
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2021-41164 is a client-side content sanitization bypass vulnerability in the Advanced Content Filter (ACF) module of CKEditor 4, an open-source WYSIWYG HTML editor. The flaw allows an attacker to inject malformed HTML that bypasses the editor's content filtering, potentially resulting in the execution of arbitrary JavaScript code in the context of the victim's browser session. All CKEditor 4 deployments at version 4.16.x and earlier are affected, and any web application embedding the editor without a server-side sanitization layer is at immediate risk. Successful exploitation could lead to stored cross-site scripting (XSS), session hijacking, account takeover, or the distribution of client-side malware, depending on how the editor output is used within the hosting application.

The vulnerability carries a CVSS score of 8.2 (High) and, while no public exploit code or CISA KEV listing exists, the flaw class (content sanitization bypass in a widely deployed editor) is well-understood within the security community. The patch confidence is rated 2/4 (CLAIMED) — the fix is attributed to a single source (Debian package tracker) and has not been independently verified across multiple advisory channels.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Technical Analysis

CKEditor 4's Advanced Content Filter (ACF) is a client-side validation and sanitization mechanism that determines which HTML elements, attributes, classes, and styles are permitted within editor content. The ACF operates on whitelist/blacklist rules defined by plugins, each declaring which tags and attributes it supports. When content is loaded into the editor (via a data attribute, an edit operation, or a paste event), the ACF transforms the input by removing disallowed constructs before the content is rendered or submitted.

The vulnerability disclosed in CVE-2021-41164 resides in the ACF's handling of malformed HTML input. Due to a parsing flaw, certain carefully crafted malformed HTML structures are not properly processed by the filter. Instead of being stripped or sanitized, these malformed constructs pass through the filter unchanged. Because the ACF relies on a full HTML parser (utilizing the browser's DOM parsing capabilities), malformed tags that confuse the parser can cause a divergence between what the ACF believes it has sanitized and what the browser subsequently interprets and executes.

The attack surface includes:

  • Editors with user-controllable content: Any CKEditor 4 instance that accepts pasted or programmatically injected HTML (including comments, forum posts, CMS pages, or chat widgets).
  • Stored vs. reflected contexts: If the unsanitized malformed HTML is stored on the server without additional server-side sanitization (a common misconfiguration when developers rely solely on the editor's client-side ACF), the payload will execute whenever another user views the content.
  • CSP (Content Security Policy) mitigation: Deployments without a strict Content-Security-Policy that blocks inline scripts (script-src 'self') will be fully vulnerable.

The technical root cause is not publicly detailed at the code-function level, and no specific function names or parser entry points have been disclosed in the NVD description or the CNA title. What is known is that the flaw is in the ACF module and may affect all plugins used by CKEditor 4. The fix in version 4.17.0 addresses the sanitization bypass, but the exact patch (changed parser behavior, additional validation rules, or post-processing of malformed nodes) is not publicly documented.


Exploitation Scenarios

No public exploit code exists for CVE-2021-41164 at the time of writing. The following attack chain is inferred strictly from the vulnerability class (client-side content sanitization bypass) and the NVD description. Specific implementation details are not fabricated.

Step 1 — Reconnaissance/Target Identification: An attacker identifies a target web application that embeds CKEditor 4 (version < 4.17.0). This can be accomplished by viewing the page source and inspecting JavaScript files for ckeditor.js or related module filenames, or by probing known editor endpoints with malformed input and observing whether the ACF responds predictably. Content management systems (WordPress, Drupal, Joomla) and custom enterprise web applications that use CKEditor 4 as a rich-text editor are prime targets.

Step 2 — Triggering the Flaw: The attacker crafts a piece of HTML that contains malformed, non-well-formed markup designed to confuse the ACF parser. For example, mismatched tags, improperly nested elements, attributes with unquoted values containing HTML entity-encoded characters, or tags with unlikely combinations of attributes. The malformed HTML is submitted through an endpoint that the editor uses — typically a paste operation, a content submission form, or a programmatic editor.setData() call that goes through the ACF sanitization pipeline.

Step 3 — Payload/Execution Method: The malformed HTML includes an inline event handler or a <script> element that is intentionally malformed enough to bypass the ACF's whitelist check but is still interpreted by the browser's HTML parser as executable JavaScript. For instance, the payload may exploit parser differences between the ACF's internal filter logic and the browser's final rendering pass; content that the ACF believes is a harmless text node may actually be parsed by the browser as an event-bearing element. The exact payload structure is not publicly known, but the class of attack — a sanitization bypass leading to script execution — is consistent with stored XSS.

Step 4 — Post-Exploitation Impact: Once arbitrary JavaScript executes in the victim's browser, the attacker can:

  • Steal session cookies and hijack authenticated user sessions.
  • Perform actions on behalf of the victim (e.g., changing account credentials, initiating unauthorized transactions).
  • Deface the page or inject phishing content.
  • Load additional malicious scripts from attacker-controlled domains.
  • Exfiltrate sensitive data rendered within the page context. If the payload was stored server-side, it will affect every user who views the compromised content, turning a single injection into a widespread, multi-victim compromise.

Impact Assessment

Business Impact: CVE-2021-41164 is rated High with a CVSS base score of 8.2. The attack requires no privileges and no prior authentication (AV:N, PR:N), and although user interaction is required (the victim must load the page containing the malformed content), the compromise of integrity and confidentiality is potentially severe. The CVSS vector (AC:L, UI:R, S:U, C:H, I:H, A:L) reflects high confidentiality and integrity impact resulting from arbitrary script execution, with limited availability impact.

Affected Systems:

  • All CKEditor 4 deployments at version 4.16.x and earlier.
  • Web applications that embed CKEditor 4 and rely on its ACF for content sanitization without an additional server-side HTML sanitizer (e.g., DOMPurify, OWASP Java HTML Sanitizer).
  • Applications that store editor-generated content natively in a database and render it back to users without server-side filtering.

Blast Radius: The editor is embedded in thousands of websites and open-source projects (its predecessor, FCKEditor, has a long deployment history; CKEditor forks are common in legacy CMS installations). The exploit requires only that a user interacts with a page containing the editor or a page that renders editor-produced output. Therefore, a single stored payload can traverse across organizational boundaries if the content is public-facing.

EPSS Context: The EPSS score is 0.01257 (66.7th percentile), indicating low but non-zero exploitation likelihood in the wild during the immediate post-disclosure window. The lack of a public PoC and absence from CISA KEV reduce the urgency, but the vulnerability class (client-side sanitization bypass) is historically a favorite target for real-world XSS attacks and should not be ignored.


Detection Guidance

Sigma Rule

title: CKEditor 4 ACF Bypass - Malformed HTML Submission
id: 9b96a2d9-1a4f-4b6f-8a27-d0c1ec22a3f1
status: experimental
description: Detects web requests containing malformed HTML patterns associated with CVE-2021-41164 attempts to bypass CKEditor 4 Advanced Content Filter.
author: valtersit.com Threat Intelligence
logsource:
  category: webserver
  product: apache
  definition: Web server access logs or WAF logs
detection:
  selection:
    c-uri|contains:
      - 'ckeditor'
    c-uri|contains|all:
      - 'html'
      - 'editor'
  malformed_content:
    sc-status: 200
    cs-method: POST
    # Requests to editor handlers are the primary vector
  filters:
    sc-status: 404
  condition: selection and malformed_content and not filters
falsepositives:
  - Legitimate users pasting complex but valid HTML content
  - Requests to non-editor endpoints that happen to contain 'ckeditor' in the path
level: medium

YARA Rule

rule CKEditor_ACF_Bypass_Payload
{
    meta:
        author = "valtersit.com Threat Intelligence"
        description = "Detects known payload patterns for CVE-2021-41164 CKEditor 4 ACF bypass"
        date = "2024-01-01"
        cvss = "8.2"
    strings:
        $js_embed = /<script[\s]*[^>]*>[^<]*eval\(/ nocase
        $event_attr = /<\w+[^>]*on\w+\s*=\s*["'][^"']{5,}["']/ nocase
        $malformed_div = /<div[^>]*><\/div[^>]*><div/ nocase
        $iframe_srcdoc = /srcdoc\s*=\s*["'][^"']*script[^"']*["']/ nocase
        $html_entity_js = /&#x[0-9a-fA-F]+;/ nocase
    condition:
        uint16(0) == 0x3c21 or any of ($js_embed, $event_attr, $malformed_div, $iframe_srcdoc, $html_entity_js)
}

Suricata IDS Rule

alert http any any -> any any (msg:"CVE-2021-41164 CKEditor 4 ACF Bypass - Malformed HTML Injection"; flow:to_server,established; content:"POST"; http_method; content:"ckeditor"; http_uri; pcre:"/<(script|iframe|object|embed)[^>]*(on\w+|javascript\s*:|srcdoc|data\s*:)/i"; classtype:web-application-attack; sid:271164001; rev:1;)

Elastic Detection

// Detect well-formed requests to CKEditor endpoints containing potential HTML injection payloads
network where event.category == "web" and process.name == "httpd" and
  http.request.method == "POST" and
  http.request.body.content : "*<*" and
  (
    http.request.body.content : "*on*=" or
    http.request.body.content : "*javascript:*" or
    http.request.body.content : "**script***"
  ) and
  http.url.path : "*ckeditor*"

Splunk SPL Query

index=web sourcetype=access_combined
| eval request_body = replace(_raw, "\"", " ")
| search request_body="*<*" AND request_body="*on*=" AND uri_path="*ckeditor*"
| rex field=uri_path "(?<editor_path>.*ckeditor.*)"
| stats count by src_ip, uri_path, sc_status
| where sc_status=200

Note: The above SPL query assumes web server logs contain POST body content. In practice, WAF logs or application error logs may be required depending on the logging configuration.

Wazuh OSSEC Rule

<group name="web_application_attack,">
  <rule id="271164" level="12">
    <if_sid>31100</if_sid>
    <match>POST</match>
    <regex>.*ckeditor.*</regex>
    <description>CVE-2021-41164: CKEditor 4 ACF Bypass - POST request to CKEditor endpoint with suspicious content</description>
    <group>attack,xss,sanitization,bypass,</group>
    <mitre>
      <id>T1190</id>
    </mitre>
  </rule>
</group>

Detection limitations: Because no public PoC exists, all detection rules target the general class of attack (malformed HTML / XSS payloads directed at editor endpoints) rather than a specific packet or string signature. Detection relies on identifying anomalous POST traffic to editor endpoints, unusually complex HTML payloads containing inline event handlers or JavaScript, or response patterns indicating a client-side script execution. In SIEM environments where request bodies are not logged, detection becomes significantly harder, and application-level logging of ACF rejection events (if enabled) should be prioritized.


Mitigation & Patch Guidance

Patch Confidence: 2/4 (CLAIMED) — The fix is attributed to a single source (Debian package tracker). While CKEditor 4.17.0 is the announced patched version, the vendor's official advisory was not independently available at the time of this report's compilation. Security teams should monitor the CKEditor vendor blog and mailing list for confirmatory notices.

1) Immediate Mitigations (if patch cannot be deployed immediately):

  • Server-side sanitization: Implement a robust HTML sanitizer on the server (e.g., DOMPurify for Node.js, OWASP Java HTML Sanitizer, or html-sanitize for Python) for all content that originates from a CKEditor instance.
  • Content Security Policy: Deploy a strict CSP that disallows inline event handlers and inline scripts. This will contain the impact of a client-side XSS even if the ACF bypass is successful.
  • Input validation: Reject or strip content containing HTML tags that are unnecessary for the application (e.g., disallow <iframe>, <script>, <object>, <embed> at the application layer).
  • Reduce attack surface: If CKEditor 4 is no longer required, replace it with CKEditor 5 (which uses a different, more robust filtering model) or an alternative editor, since the ACF in v4 is the vulnerable component.

2) Patch/Upgrade Steps:

  • Upgrade CKEditor 4 to version 4.17.0 or later.
  • If using a package manager (npm, Composer, Bower, CDN), replace the package reference with the patched version:
    • npm install ckeditor4@latest
    • Debian/Ubuntu: apt-get install ckeditor (once the patched package is available in the distribution repositories)
    • CDN: update the script URL to the 4.17.0 release tag.
  • After upgrading, run regression tests to ensure the editor's plugin ecosystem (which may rely on ACF allowing specific custom tags) still functions as expected. Re-verify that the specific malformed HTML structures that previously bypassed ACF are now stripped.

3) Long-Term Hardening:

  • Adopt a defense-in-depth approach: never rely solely on client-side content filtering for security-sensitive operations. Treat all editor output — even from a "sanitized" editor — as untrusted.
  • Institute a content validation pipeline: Incoming HTML should pass through a server-side sanitizer before database insertion and before HTML rendering on the client.
  • Enable security headers: In addition to CSP, enforce X-Content-Type-Options: nosniff and X-XSS-Protection: 1; mode=block (with CSP being the primary control).
  • Maintain an asset inventory: Identify all web applications using CKEditor 4 (or legacy forks) and ensure the patch is applied to every instance.
  • Implement Web Application Firewall (WAF) rules that block POST requests containing script-bearing HTML patterns targeting editor endpoints (Suricata rule provided above can be adapted).
  • Monitor the CKEditor security advisories page and MITRE CVE feed for further disclosures; the EPSS score of 0.01257 suggests low active exploitation, but this can change rapidly once a PoC is released.

References

  1. NVD Entry: CVE-2021-41164 — https://nvd.nist.gov/vuln/detail/CVE-2021-41164
  2. CKEditor 4 Security Advisory (vendor): CKEditor 4.17.0 release notes — https://ckeditor.com/cke4/release (confirmatory patch notice; independently verify)
  3. Debian Security Tracker: CKEditor 4 package status — https://security-tracker.debian.org/tracker/CVE-2021-41164 (primary patch source used for this intelligence report)
  4. CISA Known Exploited Vulnerabilities Catalog: CVE-2021-41164 is not listed (as of the publication date of this report) — https://www.cisa.gov/known-exploited-vulnerabilities-catalog
  5. NVD CVSS Calculator: Base score 8.2 — https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?name=CVE-2021-41164&vector=AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L

Threat Actor Activity / In-the-Wild Exploitation: As of the writing of this report, there is no evidence of in-the-wild exploitation, no public proof-of-concept code, and no CISA KEV listing for CVE-2021-41164. The EPSS percentile (66.7%) indicates moderate model confidence in eventual exploitation, but the absence of public exploit artifacts should not diminish the urgency of patching, given the historical precedent of CKEditor 4 security issues (e.g., CVE-2018-9861, a similar ACF-related XSS flaw) being used in real-world web attacks shortly after public disclosure.

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

ckeditor 4
ckeditor.js
ckeditor/ckeditor.js

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2021-41164/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.