CVE-2026-42172: Coolify API Tokens Do Not Expire—Indefinite Access Risk
Coolify is a self-hosted platform for managing servers, applications, and databases. Prior to version 4.0.0-beta.474, API tokens used by Coolify (specifically Sanctum tokens, which handle API authentication) did not automatically expire. This meant that if an attacker obtained a valid token—through a leaked credential, compromised backup, or other disclosure—that token would continue working indefinitely. An administrator would need to manually revoke the token in Coolify's settings to stop access. The vulnerability has been patched in 4.0.0-beta.474 and later.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 3.1 LOW · CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
- Weaknesses (CWE)
- CWE-613
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-07-07 / 2026-07-07
NVD description (verbatim)
Coolify is an open-source and self-hostable tool for managing servers, applications, and databases. Prior to 4.0.0-beta.474, Sanctum API tokens did not expire, allowing a leaked token to retain access indefinitely until manually revoked. This issue is fixed in version 4.0.0-beta.474.
5 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-42172 stems from missing token expiration logic in Coolify's Sanctum-based API authentication layer. Sanctum is Laravel's token-based authentication guard; the implementation prior to 4.0.0-beta.474 did not enforce expiration timestamps on issued tokens. When an attacker obtains a valid token via disclosure, network capture, or supply chain compromise, they can make authenticated API requests to the Coolify instance without time-bound constraints. The vulnerability is classified under CWE-613 (Insufficient Session Expiration), reflecting the fundamental lack of temporal controls on authentication credentials. An authenticated attacker with an intercepted token gains the same API permissions as the user who originally obtained it.
Business impact
For organizations self-hosting Coolify, this vulnerability creates persistent unauthorized access risk. If a token leaks—whether through logs, misconfigured backups, or accidental exposure in version control—an attacker retains indefinite API access to that Coolify instance. This could allow lateral movement, data exfiltration, or destructive actions against hosted applications and databases without the organization detecting the compromise through normal token rotation cycles. The practical impact depends on what the compromised token can do (read-only vs. administrative) and whether the organization monitors for suspicious API activity. Smaller teams managing Coolify without comprehensive API audit logging face elevated risk.
Affected systems
Coolify versions prior to 4.0.0-beta.474 are affected. Coolify is an open-source, self-hosted platform; there is no official commercial distribution or bundled vendor product. Any organization running Coolify on-premises or in their own infrastructure with a version older than 4.0.0-beta.474 should be considered at risk, especially if token-based API integrations or automation are in use.
Exploitability
The CVSS 3.1 score of 3.1 (LOW severity) reflects several factors: an attacker must already have obtained a valid API token (PR:L—requires prior authentication), network access is required (AV:N), and the attack complexity is high (AC:H), likely because token discovery itself is not trivial outside of specific disclosure scenarios. Once a token is in hand, however, exploitation is straightforward—the attacker simply uses it in API calls. The token does not expire on its own, so there is no time window or additional actions needed. This is not actively exploited in the wild (KEV status: false), but the simplicity of token reuse and the indefinite validity window make this a persistent threat if tokens leak through common channels.
Remediation
Upgrade Coolify to version 4.0.0-beta.474 or later. The patch implements token expiration logic, ensuring that new tokens issued after the upgrade have a defined lifespan. Tokens issued before the upgrade will not automatically expire; as a defense-in-depth measure, administrators should manually revoke any tokens known or suspected to have been exposed. Consider rotating all active API tokens after upgrade to limit the window in which pre-patch tokens remain valid. Additionally, review API access logs (if available) for suspicious activity during the time any token may have been compromised.
Patch guidance
Update Coolify to 4.0.0-beta.474 or any stable release after this beta version. Because this is a beta release, verify that your Coolify deployment supports upgrading to beta versions or wait for the corresponding stable release. Test the upgrade in a non-production environment first to ensure compatibility with your current configuration, especially if you have custom API integrations or automation scripts. After upgrade, regenerate any manually-created API tokens and configure token rotation policies in your CI/CD pipelines and integrations.
Detection guidance
Monitor Coolify API logs for unexpected authentication or API calls from unfamiliar IP addresses or user agents, particularly for administrative operations (server provisioning, database changes, application deployments). If audit logging is available, review token creation and revocation history to identify gaps or suspicious patterns. Conduct a post-incident review by cross-referencing API activity logs against known users and authorized integrations; anomalies may indicate leaked tokens in use. Implement API rate limiting and behavioral alerting to catch unusual patterns of API consumption.
Why prioritize this
Although the CVSS score is low, this vulnerability merits prompt attention in organizations running Coolify because the impact of token leakage is indefinite and potentially high-consequence. The patch is available and straightforward to apply. Prioritize this for environments where Coolify manages critical infrastructure, databases, or sensitive applications. For smaller Coolify deployments managing non-critical workloads, defer to routine patching cycles, but do not skip this update.
Risk score, explained
The CVSS 3.1 score of 3.1 reflects a low base severity driven by the requirement for prior authentication (PR:L) and high attack complexity (AC:H), indicating that an attacker must first obtain a valid token. However, once obtained, the indefinite validity of the token compounds the risk in practice. The score does not account for environmental factors such as token logging, secrets management practices, or the criticality of systems exposed via Coolify, which may elevate organizational risk beyond the base score.
Frequently asked questions
Does this vulnerability allow an attacker to create tokens without authentication?
No. This vulnerability requires that an attacker has already obtained a valid API token through other means (leaked credentials, compromised logs, exposed secrets, etc.). Once they have a token, the vulnerability is that it never expires, allowing indefinite use. The vulnerability does not bypass the initial authentication mechanism.
If I upgrade to 4.0.0-beta.474, will my existing tokens automatically expire?
No. The patch implements expiration logic for new tokens issued after the upgrade. Existing tokens issued before the upgrade will not automatically expire. Administrators should manually revoke any tokens known or suspected to have been disclosed, and regenerate tokens for active integrations.
How can I tell if my Coolify tokens have been leaked?
Check Coolify's API audit logs (if available) for unusual requests or successful authentications from unfamiliar sources. Review any CI/CD, automation, or third-party integrations that use Coolify API tokens to ensure they are operating as expected. If you cannot explain API activity, assume a token may have been compromised and revoke it immediately.
Is this vulnerability affecting Coolify in production, or only the beta version?
The vulnerability affects all versions prior to 4.0.0-beta.474. While the fixed version is labeled 'beta,' the vulnerability itself exists in both beta and stable releases before this point. Check your Coolify version and upgrade regardless of whether you run beta or stable versions.
This analysis is based on the CVE record published on 2026-07-07 and Coolify vendor documentation. No exploit code or weaponized proof-of-concept is provided. Organizations should verify patch applicability against their specific Coolify deployment and configuration. This assessment does not constitute professional security advice; conduct your own risk evaluation in the context of your environment. Coolify is open-source; installation, support, and patching responsibility lies with the deploying organization. Source: NVD (public-domain), retrieved 2026-08-15. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2025-62340LOWHCL iControl Session Timeout Vulnerability – Analysis & Remediation
- CVE-2025-36359HIGHIBM DevOps Automation and Loop Session Invalidation Flaw
- CVE-2025-71335HIGHFlowise Session Invalidation Flaw Allows Post-Password-Change Account Takeover
- CVE-2026-12772MEDIUMSession Expiration Flaw in BerriAI litellm Proxy Authentication
- CVE-2026-12796MEDIUMlitellm SSO Session Expiration Vulnerability (CVSS 6.3)
- CVE-2026-14725MEDIUMSourceCodester Boat Reservation System Session Expiration Vulnerability
- CVE-2026-44188MEDIUMAnsible Lightspeed Session Hijacking via Token Non-Revocation
- CVE-2026-44648HIGHSillyTavern Session Expiration Vulnerability – Account Takeover Risk