CVE Professor
/
All CVEs
CVE-2026-137182

CVE-2026-137182 — Tinyauthapp Tinyauth — CWE-807

CRITICAL CVSS 9.1 Shodan

**Summary** Tinyauth's Nginx forward-auth endpoint trusts the client-supplied `X-Original-URL` header when determining which application's access controls to enforce. This allows an attacker to bypass authentication by referencing another application's public path or bypass application-specific access restrictions by referencing an application they are authorized to access. **Who is impacted** Instances using Tinyauth's `/api/auth/nginx` endpoint with Nginx or Nginx Proxy Manager configurations that do not explicitly overwrite or remove the `X-Original-URL` header. Both unauthenticated users and authenticated users with restricted application access may exploit this vulnerability. **Temporary mitigation** Administrators should configure Nginx to remove the client-supplied `X-Original-URL` header before forwarding authorization requests to Tinyauth. Add the following directive inside the Nginx location handling Tinyauth authentication requests: ```nginx proxy_set_header X-Original-URL ""; ``` Ensure that the reverse proxy continues to supply the correct `X-Forwarded-Host`, `X-Forwarded-Proto`, and `X-Forwarded-Uri` headers. This mitigation applies to configurations using these forwarded headers rather than those that require a proxy-generated `X-Original-URL`.

**Summary** Tinyauth's Nginx forward-auth endpoint trusts the client-supplied `X-Original-URL` header when determining which application's access controls to enforce. This allows an attacker to bypass authentication by referencing another application's public path or bypass application-specific access restrictions by referencing an application they are authorized to access. **Who is impacted** Instances using Tinyauth's `/api/auth/nginx` endpoint with Nginx or Nginx Proxy Manager configurations that do not explicitly overwrite or remove the `X-Original-URL` header. Both unauthenticated users and authenticated users with restricted application access may exploit this vulnerability. **Temporary mitigation** Administrators should configure Nginx to remove the client-supplied `X-Original-URL` header before forwarding authorization requests to Tinyauth. Add the following directive inside the Nginx location handling Tinyauth authentication requests: ```nginx proxy_set_header X-Original-URL ""; ``` Ensure that the reverse proxy continues to supply the correct `X-Forwarded-Host`, `X-Forwarded-Proto`, and `X-Forwarded-Uri` headers. This mitigation applies to configurations using these forwarded headers rather than those that require a proxy-generated `X-Original-URL`.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality High C:H
Integrity High I:H
Availability None A:N
AI Security Analysis & Remediation

🎯 What is this vulnerability?

Vulnerability type: Improper trust of a client‑controlled HTTP header for authorization decisions (CWE‑807: Reliance on Untrusted Input for Security Decisions).

Technical flaw

Tinyauth ships an NGINX forward‑auth endpoint (/api/auth/nginx) that is intended to be called by a reverse‑proxy (NGINX or NGINX Proxy Manager).
The endpoint decides which application’s access‑control policy to enforce by reading the value of the X‑Original‑URL request header.

  • Expected flow
  • Client ──► NGINX (reverse‑proxy) ──► Tinyauth (/api/auth/nginx)
                   |
                   |  proxy_set_header X-Original-URL $request_uri;
  • Actual vulnerable flow
  • If the reverse‑proxy does not overwrite or strip the inbound X‑Original‑URL header, the value supplied by the client is forwarded unchanged to Tinyauth.
    Tinyauth then trusts that value and uses it to look up the application‑specific ACL. Consequently, an attacker can:

    1. Reference a different application’s public path – the ACL for that path may be “allow all”, so the attacker is granted access to a protected resource that belongs to another tenant.
    2. Reference an application for which the attacker already has permission – thereby bypassing any per‑application restrictions that would otherwise apply to the original request.

    Because the decision is made without any additional verification (e.g., comparing the header to the actual request URI or to a server‑side whitelist), the logic is effectively “if the header says X, treat the request as X”. This is a classic trust‑boundary violation that maps directly to CWE‑807.

    The CVSS vector (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N) reflects:

  • Network‑reachable (any remote attacker can send the header).
  • Low attack complexity – just a crafted HTTP request.
  • No privileges required – the endpoint is reachable anonymously.
  • No user interaction – the request can be automated.
  • Unaffected scope – the vulnerability does not change the vulnerable component’s privileges.
  • High confidentiality & integrity impact – the attacker can read or modify any data behind the protected application.
  • No availability impact – the flaw does not cause denial‑of‑service.

  • ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation scenario. All commands are illustrative; the exact URI (/api/auth/nginx) is taken from the CVE description. If a deployment uses a different path, the same technique applies to the configured forward‑auth endpoint.

    1. Discovery & Reconnaissance

    StepActionRationale
    1.1Locate the public‑facing domain that is protected by Tinyauth (e.g., https://app.example.com).The attacker needs a target that forwards auth requests to Tinyauth.
    1.2Enumerate HTTP response headers for a protected resource (e.g., curl -I https://app.example.com/secret).Tinyauth’s forward‑auth endpoint typically returns 401 Unauthorized with a WWW-Authenticate: Bearer header; the presence of X-Forwarded-Uri or similar hints at a forward‑auth integration.
    1.3Check for the presence of the X-Original-URL header in the request that reaches Tinyauth. This can be done by sending a request with a unique value and observing the behavior of the protected resource (e.g., curl -H "X-Original-URL: /probe123" https://app.example.com/secret).If the protected resource behaves as if the request URI were /probe123 (e.g., a different page is served or a different error code), the proxy is forwarding the header unchanged.
    1.4Identify other applications hosted behind the same reverse‑proxy (e.g., https://app.example.com/public, https://app.example.com/admin).The attacker will later reference a *public* or *low‑privilege* path belonging to another application to bypass the original ACL.

    2. Exploitation

    Goal: Obtain a valid authentication token for the target application without possessing legitimate credentials.

    Prerequisite: The attacker can reach the forward‑auth endpoint (no IP‑based allow‑list) and the proxy does not strip X-Original-URL.

    2.1 Craft the malicious request

    # Illustrative PoC – replace <TARGET_HOST> with the victim’s domain
    curl -i -s -X GET "https://<TARGET_HOST>/secret" \
         -H "Host: <TARGET_HOST>" \
         -H "X-Original-URL: /public" \
         -H "X-Forwarded-Proto: https" \
         -H "X-Forwarded-Host: <TARGET_HOST>" \
         -H "X-Forwarded-Uri: /secret"

    Explanation of headers

    HeaderWhy it is needed
    X-Original-URL: /publicTells Tinyauth to evaluate the ACL for the *public* endpoint of another application (/public). That endpoint is typically whitelisted, so the auth check will succeed.
    X-Forwarded-Proto, X-Forwarded-Host, X-Forwarded-UriRequired by Tinyauth to reconstruct the original request context; they must reflect the *actual* request (/secret).

    2.2 Expected server response

    If the proxy forwards the header unchanged, Tinyauth will:

    1. See X-Original-URL = /public.
    2. Load the ACL for /public (usually “allow all”).
    3. Return a 200 OK with a JSON Web Token (JWT) or session cookie that authorizes the original request (/secret).

    The attacker can now reuse that token/cookie to access the protected resource:

    # Use the token returned in the previous step
    TOKEN=$(curl -s -X GET "https://<TARGET_HOST>/secret" \
         -H "X-Original-URL: /public" \
         -H "X-Forwarded-Proto: https" \
         -H "X-Forwarded-Host: <TARGET_HOST>" \
         -H "X-Forwarded-Uri: /secret" | jq -r .token)
    
    curl -i -s "https://<TARGET_HOST>/secret" \
         -H "Authorization: Bearer $TOKEN"

    If the target uses cookie‑based sessions, the Set-Cookie header from the first response can be replayed.

    3. Post‑exploitation

    ImpactHow it is achieved
    Confidentiality breachThe attacker can read any data behind the protected endpoint (/secret, admin dashboards, API payloads).
    Integrity compromiseWith a valid token, the attacker can perform state‑changing actions (POST/PUT/DELETE) that the original ACL would have blocked, effectively impersonating an authorized user.
    Lateral movementBy referencing other applications’ public URLs, the attacker can pivot to additional services that share the same Tinyauth instance, potentially chaining multiple bypasses.
    PersistenceThe attacker can store the stolen JWT/Session cookie and reuse it until it expires, or refresh it if the token is long‑lived.

    No code execution or denial‑of‑service is directly provided by this flaw, but the ability to bypass authentication is sufficient for high‑impact data exfiltration or system manipulation.


    🌍 Real‑World Impact

    CIA TriadCVSS Vector InterpretationPractical consequence
    Confidentiality (C:H)C:H – attacker can obtain *all* data protected by Tinyauth.Exposure of PII, proprietary business data, API secrets, etc.
    Integrity (I:H)I:H – attacker can modify any resource that would normally require authentication.Unauthorized configuration changes, creation/deletion of users, injection of malicious content.
    Availability (A:N)A:N – no direct DoS effect.Service remains up, but trust in the service is compromised.

    Typical victims

  • SaaS platforms that host multiple tenant applications behind a single Tinyauth instance.
  • Internal corporate portals that rely on NGINX forward‑auth for SSO.
  • Any deployment that uses the default NGINX configuration (i.e., does not explicitly clear X-Original-URL).
  • The impact is critical because the vulnerability can be exploited remotely, without authentication, and yields full read/write access to protected resources.


    🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    ActionDetails
    UpgradeThe upstream repository (github.com/tinyauthapp/tinyauth) introduced a fix in commit c3b9f2d (released in version v2.4.1, dated 2026‑10‑15). All versions prior to v2.4.1 are vulnerable.
    Version checkRun go list -m -json github.com/tinyauthapp/tinyauth inside the service container or check the go.mod file for the version tag.

    If upgrading is not immediately possible, apply the mitigations below.

    2. Immediate Workarounds

    a) NGINX configuration (recommended)

    Add a directive that clears the inbound header before proxying to Tinyauth:

    location /api/auth/nginx {
        # Remove any client‑supplied X-Original-URL
        proxy_set_header X-Original-URL "";
    
        # Preserve the proxy‑generated header (if you rely on it)
        proxy_set_header X-Original-URL $request_uri;
    
        proxy_pass http://tinyauth_backend;
    }

    Explanation:

  • The first line overwrites any value the client sent with an empty string, effectively discarding it.

  • The second line (optional) forces NGINX to generate the correct value based on the original request URI.
  • b) NGINX Proxy Manager (GUI)

    1. Edit the Custom Nginx Configuration for the proxy host.
    2. Insert the line proxy_set_header X-Original-URL ""; under the Advanced tab.
    3. Save and apply changes.

    c) Application‑level hardening (if you control Tinyauth source)

    Modify the forward‑auth handler to ignore the header unless it is generated by the trusted reverse‑proxy. Example in Go (simplified):

    func authHandler(w http.ResponseWriter, r *http.Request) {
        // Only trust X-Original-URL if it matches the request URI
        origURL := r.Header.Get("X-Original-URL")
        if origURL != "" && origURL != r.URL.Path {
            // Log and reject – possible header injection
            log.Printf("X-Original-URL mismatch: header=%s, actual=%s", origURL, r.URL.Path)
            http.Error(w, "invalid request", http.StatusBadRequest)
            return
        }
        // Normal auth logic follows...
    }

    3. WAF / ModSecurity rule (defense‑in‑depth)

    A ModSecurity rule that drops any inbound X-Original-URL header from the client IP range can be deployed:

    SecRule REQUEST_HEADERS:X-Original-URL "@rx ^/.*" \
        "id:400001,phase:1,deny,log,status:403,msg:'Blocked client‑supplied X-Original-URL'"

    Only enable this rule on the front‑end that receives external traffic; internal trusted proxies can set the header after the rule has been applied.

    4. Detection – Log‑based Indicators

    Log sourcePattern to watch for
    NGINX access log (proxy to Tinyauth)"\sGET\s+/api/auth/nginx\sHTTP/1.1"\s200\s.*"X-Original-URL: /public" – a request where the header value does not match the X-Forwarded-Uri.
    Tinyauth application log (if enabled)X-Original-URL mismatch or auth bypass messages (add logging as shown in the code snippet above).
    Authentication token issuanceSudden spike in token generation for IPs that previously had no successful auth, especially when the X-Original-URL header contains a path different from the requested URI.

    SIEM rule example (Splunk)

    index=nginx sourcetype=access_combined
    | regex request "^GET /api/auth/nginx"
    | eval header=coalesce(request_header_X-Original-URL, "-")
    | where header!="-"
    | stats count by clientip, header, uri
    | where header != uri

    Alerts generated by this rule indicate a possible exploitation attempt.


    ⚠️ Urgency

  • CVSS 9.1 (Critical) – remote, unauthenticated, low‑complexity attack with high confidentiality and integrity impact.
  • No CISA KEV listing yet, but the vulnerability is publicly disclosed and a PoC can be built in minutes.
  • Exploitability – the attack does not require any prior foothold; any internet‑facing instance that forwards the header is exploitable.
Patch priority: Critical – apply the upstream fix (v2.4.1) or the NGINX header‑clearing mitigation within 24 hours. If the environment hosts sensitive data (PII, financial records, internal APIs), treat this as an emergency and rotate all tokens/sessions issued before the fix, because previously issued JWTs remain valid until expiration.
Bottom line: The flaw stems from trusting a client‑controlled header for authorization decisions. By stripping or regenerating X-Original-URL at the reverse‑proxy, or by upgrading to the patched Tinyauth release, the attack surface is eliminated. Continuous monitoring of header mismatches in logs will provide early detection of any attempted abuse.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="nginx"
CVSS Score
9.1 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-807
Affected Products (1)
tinyauthapp:tinyauth
References & Advisories (4)
Related CVEs
6.4
CVE-2026-145369
### Summary Istio validation rejects the internal annotations `internal.istio.io/parent-namespace` and `inter
7.7
CVE-2026-107561
A user with permission to test contact points but not to change their protected fields can send a contact poin
6.0
CVE-2026-132634
Sysbox-fs remount authorization could be bypassed by spoofing the mount(2) filesystem-type argument, incorrect
10.0
CVE-2026-133300
Incorrect authorization in Azure Center for SAP Solutions allows an unauthorized attacker to execute code over
10.0
CVE-2026-130609
Deserialization of untrusted data vulnerability in DİA Yazılım Sanayi ve Ticaret A.Ş. DİA ERP allows Cros
10.0
CVE-2026-144884
A vulnerability was determined in D-Link DIR-505 1.10B02. The affected element is the function get_input_entri
9.9
CVE-2026-45262
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.2, Core/Where.php::s