CVE-2026-43938: YAFNET.Core Cross-Site Scripting Vulnerability
HIGHCVE-2026-43938 is a HIGH (CVSS 8.1) cross-site scripting vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting YAFNET.Core libraries in the NuGet ecosystem. The issue involves yafnet has unauthenticated stored second-order xss in admin event log via reflected `user-agent` header. Remediation is available by upgrading affected packages to version 4.0.5, 3.2.12.
CVE-2026-43938 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-43938
To remediate this vulnerability, upgrade all affected YAFNET.Core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade YAFNET.Core to 4.0.5
Upgrade YAFNET.Core to 3.2.12
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for YAFNET.Core
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-43938, inspect your project dependencies for YAFNET.Core:
inspect dependencies for YAFNET.Core
Analyze the terminal output to locate any version of YAFNET.Core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.5), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In YAFNET.Core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-43938 Affected YAFNET.Core Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
YAFNET.Core
|
NuGet |
≥ 4.0.0-beta01
< 4.0.5
|
4.0.5
|
|
YAFNET.Core
|
NuGet |
< 3.2.12
|
3.2.12
|
References
Frequently Asked Questions
What is CVE-2026-43938?
Which YAFNET.Core versions are affected?
What version fixes CVE-2026-43938?
Is YAFNET.Core affected?
What is the CVSS score of CVE-2026-43938?
What CWE is associated with CVE-2026-43938?
How can I check NuGet dependencies for CVE-2026-43938?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-33gv-fc78-qgf5",
"modified" : "2026-05-13T16:24:19Z",
"published" : "2026-05-05T20:31:36Z",
"aliases" : [ "CVE-2026-43938" ],
"summary" : "YAFNET has Unauthenticated Stored Second-Order XSS in Admin Event Log via Reflected `User-Agent` Header",
"details" : "**Description:**\nStored (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.\n\n**Issue Details:**\nThe 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.\n\n**Impact:**\nAn 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.\n\n**Likelihood:**\nExploitation 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.\n\n**Steps to Reproduce:**\n- From an unauthenticated session (no cookies, no tokens), send the following request with a malicious `User-Agent` header:\n - `curl.exe -sS -A \"<img src=x onerror=alert('XSS')>\" \"http://yetanotherforum.internal:8080/api/Attachments/GetAttachment?attachmentId=2147483647\"`\n- Confirm the server returns an error response and that a row has been written to `dbo.EventLog` containing the attacker-controlled `UserAgent` value inside the JSON `Description`.\n- As an administrator (e.g., `Superuser`), navigate to `/Admin/EventLog`.\n- Observe that the rendered page contains the raw `<img src=x onerror=\"alert('XSS')\">` element inside the event's badge block, and that the `onerror` handler executes in the admin's authenticated session, confirming cross-session, cross-privilege script execution from an unauthenticated source.\n\n<img width=\"1193\" height=\"809\" alt=\"image\" src=\"https://github.com/user-attachments/assets/70c59ef2-8d31-435b-9a9d-338f753e58f8\" />",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "NuGet",
"name" : "YAFNET.Core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0-beta01"
}, {
"fixed" : "4.0.5"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.0.4"
}
}, {
"package" : {
"ecosystem" : "NuGet",
"name" : "YAFNET.Core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.2.12"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.2.11"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/YAFNET/YAFNET/security/advisories/GHSA-33gv-fc78-qgf5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-43938"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/YAFNET/YAFNET"
}, {
"type" : "WEB",
"url" : "https://github.com/YAFNET/YAFNET/releases/tag/v3.2.12"
}, {
"type" : "WEB",
"url" : "https://github.com/YAFNET/YAFNET/releases/tag/v4.0.5"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-116", "CWE-79", "CWE-80" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-05T20:31:36Z",
"nvd_published_at" : "2026-05-12T15:16:15Z"
}
}