Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-126473 — Differential PoC lab for CVE-2026-126473: exploits OpenEMR OAuth scope canonicalization and containment flaws to gain unauthenticated FHIR Patient write, with vuln/fixed/mitigation containers. | Kitploit
Tools/GitHubGitHub/googlesky/cve-2026-126473
Authentication & AuthorizationVulnerability AnalysisExploitationWeb Application ExploitationAPI Security TestingWeb SecurityAPI SecurityLabs & Practice
GitHubgooglesky/cve-2026-126473

CVE-2026-126473

Differential PoC lab for CVE-2026-126473: exploits OpenEMR OAuth scope canonicalization and containment flaws to gain unauthenticated FHIR Patient write, with vuln/fixed/mitigation containers.

5 days agoNot yet reviewed
Share
View Repository

CVE-2026-126473 — OpenEMR OAuth Scope Canonicalization + Containment: Unauthenticated FHIR Patient Write

License: MIT Research status: validated

CVECVE-2026-126473 (GHSA-6xh3-fmm5-jjp4, Critical 9.1 CVSS v3.1)
ComponentOpenEMR — ScopeEntity (canonicalization + containsScope), ScopeRepository::hasSystemScopes, dynamic registration, client-credentials grant
Affected< 8.4.0 (8.3.0 tested; official image 8.3.0-2026-08-20)
Fixed in8.4.0 — the colon-form resource scope is rejected at registration
CWECWE-863 (Incorrect Authorization)
ImpactAn unauthenticated network attacker registers a colon-form system:Patient.read client that bypasses administrator approval, then obtains the unregistered system/Patient.write scope through the faulty containment check — yielding FHIR Patient create (and search) with a system token
VectorNetwork: POST /oauth2/default/registration + POST /oauth2/default/token + FHIR endpoints; no account, no admin approval, no victim interaction
TriggerScope spelling system:Patient.read + token request with system/Patient.read system/Patient.write
CreditReported by @mcspicyenjoyer; advisory published by bradymiller (OpenEMR)

OpenEMR 8.3.0 chains two independent OAuth scope defects into one unauthenticated compromise of the FHIR Patient record store. The scope parser accepts either / or : as the context delimiter, but the privileged-scope approval logic searches registration strings only for the literal system/ — so a client registered with system:Patient.read is persisted enabled while the identical slash-form client is persisted disabled. Independently, the legacy containment check containsScope() returns the requested permission instead of verifying the containing scope holds it, so the enabled read-only client obtains the unregistered system/Patient.write. The lab reproduces the complete chain against the official production image with database-level evidence of the approval differential, and demonstrates the fixed 8.4.0 build rejecting the colon-form registration outright.

1. Root cause

Issue A — canonicalization inconsistency. ScopeEntity::createFromString() accepts either delimiter and getScopeLookupKey() canonicalizes to slash-form:

$regex = "/^([a-zA-Z_]+)(?:[\/:](https://github.com/googlesky/cve-2026-126473/blob/main/%5Ba-zA-Z0-9%5C%2A_%5C-%5D%2B)(?:\.([^\?]+))?)?(?:\?(.*))?$/";
// ...
return $this->context . '/' . $this->resource;

so system:Patient.read passes server scope validation. But the approval decision searches raw registration strings:

private function hasSystemScopes(array $scopes): bool
{
    return $this->scopeArrayHasString($scopes, 'system/');
}

ClientRepository::insertNewClient() therefore persists the colon-form system client as enabled. The violated invariant: every system/* client requires administrator approval regardless of spelling.

Issue B — containment returns the requested permission. ScopeEntity::containsScope():

$otherPermissions = $otherScope->getPermissions();
if ($otherPermissions->v1Read) {
    return $otherPermissions->v1Read;
}
if ($otherPermissions->v1Write) {
    return $otherPermissions->v1Write;
}

asks "does the request carry write?" and answers itself. It is used for both the server-supported-scope check and the registered-client-scope check, so a read-only client receives system/Patient.write (create + update + delete) although neither the server allowlist nor its own registration contains it. The violated invariant: an issued token may contain only permissions the server supports and the client was granted.

2. Reproduction environment

serviceimagerole
mariadbmariadb:11.8per-instance site databases
openemr-vulnopenemr/openemr:8.3.0-2026-08-20vulnerable side, rest_fhir_api=1, rest_system_scopes_api=1, oauth_app_manual_approval=0
openemr-fixedopenemr/openemr:8.4.0fixed side, identical settings
openemr-vuln-manual8.3.0-2026-08-20vulnerable side with the published mitigation (oauth_app_manual_approval=1)
poc—stdlib Python driver (RSA via the openssl CLI)

The three settings are applied through the image's documented OPENEMR_SETTING_* variables; the first two default off, the approval mode is the default. Every container is CPU/memory bounded on the isolated cve126473lab network and contains only synthetic Patient records created by the PoC itself.

3. Running the environment

./run-lab.sh build     # PoC runner image
./run-lab.sh sweep     # exploit (fresh vuln) / probe / mitigation / DB differential
./run-lab.sh down

Single mode:

podman run --rm --network=cve126473lab cve-2026-126473-poc:local exploit

4. The PoC

poc/poc.py — stdlib-only Python (RSA keypair generated and parsed with the openssl CLI; OpenEMR requires RS384 client assertions — RsaSha384Signer — and validates the assertion audience against the token endpoint). Four modes:

modepurpose
checkclassify one instance: colon-form registration + read token + escalated scope request (creates one client — documented side effect)
exploitfull differential on vuln and fixed: slash control disabled, colon enabled, unregistered write granted, FHIR create 201
probethe flaws in isolation: Issue A behavioral pair, Issue B escalated scope, read-only-token FHIR search
mitigationthe published workaround (oauth_app_manual_approval=1) on the same vulnerable binary — both spellings stay disabled; containment (Issue B) remains for approved clients

Exit codes: 0 safe / workaround validated, 1 vulnerable, 2 target unreachable, 3 inconclusive, 4 internal error.

5. Expected results

reproduction pathvulnerable 8.3.0fixed 8.4.0evidence
slash control registration, canonical read tokenregistration 200, persisted is_enabled=0; token 401 invalid_clientsameevidence/poc-exploit.txt, evidence/db-is-enabled.txt
colon registration system:Patient.read200, persisted is_enabled=1 — approval bypassedregistration 400 — colon-form scope rejectedevidence/db-is-enabled.txt, evidence/poc-exploit.txt
colon canonical read token200, system/Patient.read401evidence/poc-exploit.txt
colon escalated token (+ unregistered write)200, scope = system/Patient.read system/Patient.write401evidence/poc-exploit.txt
FHIR create with the escalated token201, synthetic Patient persisted (pid=1)not reachedevidence/poc-exploit.txt
read-only token FHIR search200—evidence/poc-probe.txt
mitigation: manual approval on the vulnerable binarycolon client stays disabled — token 401—evidence/poc-mitigation.txt

6. Environment preconditions

  • Podman with podman compose; --cpus 2 --memory 4g per container; isolated cve126473lab network.
  • Outbound network once, to pull the two official OpenEMR images and mariadb.
  • First boot runs OpenEMR's database auto-setup (~2–4 minutes per instance); the PoC polls the OIDC discovery document until ready.
  • The first system-client token request on a pristine site returns HTTP 500 server_error; the advisory documents exactly one retry — the PoC permits it, deterministically.
  • Registrations accumulate in the site database; run-lab.sh sweep restarts the vulnerable instance for a clean run.

7. Additional findings (0-day sweep)

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    936
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    555
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    353
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    348
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    336
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    288

Explore all tools

Browse our collection of tools

View all tools →