Aug 26, 2026·7 min read·55 visits
A structural logic flaw in eml_parser's validation flow allows attackers to obfuscate malicious URLs using HTML entities. The module validates candidate strings before decoding them, causing the extraction engine to discard the obfuscated links. This lets phishing and malware campaigns evade security automated tooling while remaining fully functional in the victim's email client.
A critical logical flaw in the eml_parser Python module prior to version 3.0.2 allows malicious URLs to evade automated security analysis pipelines. By encoding key URI delimiter characters as HTML decimal entities, an attacker can mask indicators of compromise. Security controls, orchestration layers, and sandbox systems fail to detect these links, while downstream Mail User Agents natively reconstruct the malicious hyper-references when processed by end-users. This mechanism undermines the integrity of automated indicator extraction processes within Security Operations Centers.
The Python library eml_parser, developed by GOVCERT-LU, is a foundational component used in threat intelligence, incident response, and automated security orchestration. Its primary function is to parse electronic mail (.eml) files, extracting metadata, headers, attachments, and URLs. This structured output is heavily relied upon by Security Operations Centers (SOCs) to query threat intelligence platforms, execute sandbox analyses, and feed downstream security orchestration, automation, and response (SOAR) workflows.\n\nPrior to version 3.0.2, the library contained a critical logical vulnerability within its URL parsing and sanitization pipeline. This flaw falls under the CWE-116 classification (Improper Encoding or Escaping of Output). Because email ingestion systems parse mail headers and body text dynamically, the integrity of the parsing output is paramount to identifying and blocking malicious payloads before they reach downstream recipients.\n\nWhen processing HTML-formatted email bodies, the parser identifies potential URL strings via regular expressions. However, if an attacker uses HTML entity representation to encode key structural characters of the URL (such as colons, slashes, or periods), the internal verification logic in eml_parser discards the candidate string. Consequently, the extracted JSON payload returned by the parser entirely omits these obfuscated URLs, allowing them to bypass detection rules.
The root cause of this vulnerability lies in the execution order of operations within the clean_found_uri method of eml_parser/parser.py. The function is designed to validate and prune candidate URI strings discovered during body parsing. Specifically, it executes a validation block to filter out non-functional URIs before it performs HTML entity unescaping.\n\nTo filter out invalid or malformed strings, the function checks if the candidate URL contains a physical period character (.) or an opening bracket ([), which is typical for IPv6 literals. If neither character is found in the raw string, the parser assumes the candidate is invalid and immediately discards it by returning None. This validation logic is executed on the raw, encoded string extracted from the HTML message.\n\nIf an attacker replaces structural characters such as a period with its equivalent HTML entity representation (.), the validation condition '.' not in url and '[' not in url evaluates to true. As a result, the function returns None and exits early. The logic that performs entity unescaping (unescape(url)) is situated at the very end of the function and is never executed. This design flaw prevents the normalization of the input string prior to validation.\n\n```mermaid\ngraph LR\n A["Raw HTML Email Input"] --> B["Regex Extract Candidates"]
B --> C["Validate (Checks for '.' and '[')"]
C -- "No literal '.' (Entity encoded)" --> D["Discard URL (Return None)"]
C -- "Literal '.' present" --> E["Unescape Entities"]
E --> F["Store in Output JSON"]
style D fill:#f99,stroke:#333,stroke-width:2px
An analysis of the vulnerable code path in versions prior to 3.0.2 reveals how the validation logic prematurely terminates processing. The code-level mismatch is highlighted below in the comparison of the vulnerable and patched states of the clean_found_uri method.\n\npython\n# Vulnerable implementation in eml_parser/parser.py (Pre-v3.0.2)\n\ndef clean_found_uri(self, url: str) -> str | None:\n # The structural validation occurs immediately on raw input\n if '.' not in url and '[' not in url:\n # Discards valid but encoded URLs like phishing.com\n return None\n\n # Additional sanitization is processed here...\n if url.endswith('://'):\n return None\n\n # Entity unescaping is unreachable for obfuscated payloads\n if '&' in url:\n url = unescape(url)\n\n return url\n\n\nIn version 3.0.2, the vulnerability was resolved by reordering the sequence of actions. The unescaping mechanism was moved to the absolute entry point of the function, ensuring that all subsequent validation checks operate on a normalized canonical string. Additionally, the patch implemented secondary parsing to recursively pull domains directly from successfully cleaned URLs to prevent domain bypasses.\n\npython\n# Patched implementation in eml_parser/parser.py (v3.0.2)\n\ndef clean_found_uri(self, url: str) -> str | None:\n # Fix: Unescape HTML entities at the entry point\n if '&' in url:\n url = unescape(url)\n\n # Validation is now executed on the normalized, unescaped string\n if '.' not in url and '[' not in url:\n return None\n\n if url.endswith('://'):\n return None\n\n return url\n\n\n> [!NOTE]\n> The fix is highly complete and structurally sound. By forcing early normalization, it systematically eliminates any permutation of HTML decimal or hexadecimal entity encoding bypasses against the URL validation check. No variant attacks against the same code path remain feasible under this logic.
Exploitation of this vulnerability requires no special system configuration or authentication, relying entirely on input manipulation. The attack scenario targets automated security analytics tools that ingest email files via python scripts using eml_parser.\n\nAn attacker starts by identifying a target phishing landing page, for example https://phishing.example.com/verify. To bypass detection, the attacker obfuscates the URL delimiters using HTML entity codes, substituting colons, slashes, and dots with their decimal representations: : becomes :, / becomes /, and . becomes .. This converts the hyperlink into the following string: https://phishing.example.com/verify.\n\nThe attacker embeds this obfuscated URL inside an HTML-formatted .eml file. When the security gateway processes the incoming mail file using eml_parser, the regex engine extracts the obfuscated string. However, because the raw extracted string lacks a physical dot character, the validation function discards the candidate. The resulting JSON metadata returned by the parser contains empty lists for both parsed URIs and observed domains, which leads the gateway to classify the email as clean.\n\nFinally, the email is delivered to the recipient. The Mail User Agent (MUA) or webmail interface used by the victim natively parses HTML emails. During rendering, the browser or mail client decodes the decimal entities to establish a valid functional hyperlink. When the victim clicks the link, they are directed to the phishing site, successfully bypassing the analysis pipeline.
The primary security impact of CVE-2026-55618 is the compromise of analytical integrity in automated defensive tools. While it does not directly lead to remote code execution on the server executing eml_parser, it facilitates blind spots in security tools, creating a reliable path for delivery-phase evasion in targeted phishing and social engineering campaigns.\n\nIn automated incident response setups, SOAR playbooks automatically parse incoming suspicious emails reported by users. If a playbook relies on eml_parser to extract and submit indicators to firewalls, secure email gateways, and endpoint detection engines, this vulnerability ensures that high-risk indicators are completely missed. Consequently, threat intelligence platforms will not capture the threat data, and active attacks will go unnoticed.\n\nThe CVSS v3.1 score of 6.5 (Medium) reflects the severity of this issue. Although confidentiality and availability remain unaffected, the integrity impact is high because security controls are rendered ineffective. This logic flaw allows malicious links to bypass inspection, demonstrating how small structural parsing errors can compromise broader defense-in-depth strategies.
Definitive remediation requires upgrading eml_parser to version 3.0.2 or higher. This update resolves the URL validation ordering issue and introduces security improvements that mitigate other vulnerabilities in the parsing pipeline.\n\nFor environments where an immediate upgrade is not feasible, an interim mitigation involves processing the raw email body before it is passed to eml_parser. Utilizing Python's built-in html.unescape function on raw HTML body components before passing the payload to the parser acts as a temporary workaround. This ensures that the validator is supplied with already-normalized inputs.\n\npython\nimport html\nfrom eml_parser import EmlParser\n\ndef safe_parse_eml(raw_eml_bytes):\n # Perform entity normalization prior to parser execution\n decoded_content = html.unescape(raw_eml_bytes.decode('utf-8', errors='ignore'))\n parser = EmlParser()\n return parser.decode_email_bytes(decoded_content.encode('utf-8'))\n\n\nIn addition to the URL extraction fix, version 3.0.2 addresses other vulnerabilities. It mitigates potential Denial of Service (DoS) conditions caused by extremely deep headers and eliminates a Regular Expression Denial of Service (ReDoS) vulnerability in the parentheses clean-up logic (noparenthesis in routing.py). Upgrading therefore hardens the parsing workflow against both bypass and performance-exhaustion vectors.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
eml_parser GOVCERT-LU | < 3.0.2 | 3.0.2 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-116 |
| Attack Vector | Network (AV:N) |
| CVSS Score | 6.5 |
| EPSS Score | Not registered |
| Impact | High Integrity Loss (Bypass of security analysis pipelines) |
| Exploit Status | Proof of Concept (PoC) |
| KEV Status | Not Listed |
The product does not escape or clean output, or does so incorrectly, which can allow an attacker to bypass validation or introduce injection vulnerabilities.
CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.
CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.
The Natural Language Toolkit (NLTK) versions 3.6 through 3.10.3 contain an algorithmic complexity vulnerability in the LegalitySyllableTokenizer.tokenize method. When processing tokens composed of continuous runs of vowels, an unguarded string reversal and set membership lookup loop executes in quadratic time relative to the input token length. Remote attackers capable of submitting arbitrary text to applications utilizing this tokenizer can trigger sustained single-core CPU exhaustion and application-level denial of service.
CVE-2026-126304 is a symlink path traversal vulnerability (CWE-59) in the Natural Language Toolkit (NLTK) versions 3.10.0 prior to 3.10.4. The YCOECorpusReader class constructs internal sub-readers for the 'psd' and 'pos' subdirectories using FileSystemPathPointer.join(), which relies exclusively on lexical string-prefix validation rather than canonical path resolution. An attacker who supplies a crafted YCOE corpus containing symbolic links in place of the 'psd' or 'pos' subdirectories can bypass directory confinement and read arbitrary files from sibling corpora or sensitive directories within the NLTK data sandbox.
CVE-2026-128077 (GHSA-r99w-jh2x-3mg9) is an authorization bypass and interpretation conflict vulnerability affecting Nuxt and its underlying @nuxt/nitro-server package in versions 4.6.0 through 4.6.3. When an incoming HTTP request path begins with a double forward slash (e.g., //x/admin), the WHATWG URL parser within the Nuxt server-side page renderer interprets the initial segment as a network host/authority and resolves the remaining path (/admin) against the application's page router. Because Nitro server middleware, route-scoped serverHandlers, and Nitro routeRules evaluate the unparsed request path (//x/admin), path-based access controls, redirects, and security header policies configured for /admin fail to match and are bypassed.
Prior to version 2.10.2, the sqlite3-ruby gem explicitly cast 64-bit Ruby string lengths (long) to 32-bit signed integers (int) when invoking the underlying SQLite C API. On 64-bit platforms, providing a string of 4 GiB (2^32 bytes) or larger causes integer truncation, instructing SQLite to process only a prefix of the string. This flaw affects SQL query preparation, bound parameter values, and return values from custom Ruby-defined SQL functions and aggregates, allowing trailing SQL clauses such as WHERE restrictions to be silently dropped under specific conditions.