/

CVE-2026-41896

Severity:

HIGH RISK

(7.5)

Weak HMAC Auth (CWE-287) in Coolify GitHub Webhooks

CVE-2026-41896

Deferred

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287

Impact:

Unauthorized Deployment Trigger

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Coolify's GitHub webhook authentication can silently fall back to using an empty string as the HMAC key when the manual_webhook_secret_github is null.

Because this produces a deterministic, attacker-calculable signature, unauthenticated attackers can forge valid webhook requests and trigger deployments under these conditions.

Affected context

This vulnerability occurs in Coolify instances that rely on GitHub webhooks to trigger application deployments and leave the manual_webhook_secret_github configuration unset or null.

In this state, the HMAC verification logic still executes but uses an effectively public key (the empty string), making signature validation meaningless and allowing any party with network access to the webhook endpoint to submit requests that pass verification.

Exploit preconditions

  • Attack surface: Public or internally exposed Coolify webhook endpoints receiving GitHub-style payloads.
  • Required access: Network access to the webhook URL; no valid GitHub secret or credentials are needed when the secret is null.
  • Trigger point: Submission of a crafted request containing a payload and an X-Hub-Signature-256 header computed as HMAC-SHA256 over the payload using an empty string key.
  • Why exploitation is possible: PHP's hash_hmac() function coerces a null key to '', causing the server to accept signatures derived from a non-secret value that any attacker can replicate.

Why this happens

The underlying issue is an authentication design flaw where a nullable secret field is used directly as the HMAC key without enforcing non-null, non-empty constraints or providing a secure default.

In PHP, calling hash_hmac() with a null key results in implicit conversion to an empty string, which is not secret and therefore unsuitable for authentication.

This maps to CWE-287: Improper Authentication, as the system appears to perform HMAC verification but does so with a predictable key, effectively disabling the authenticity guarantees of the webhook signature mechanism.

Potential impact

  • Unauthenticated attackers could trigger arbitrary deployments for affected applications.
  • Attackers may force deployment of unreviewed or malicious code if CI/CD pipelines are weakly controlled.
  • Automated deployment workflows can be abused to cause service disruption or resource exhaustion.
  • Logs and auditing systems may misleadingly record these actions as legitimate webhook-triggered events.

General mitigation guidance

Mitigation generally focuses on hardening authentication around webhook handling and treating secrets as mandatory security-critical configuration.

Recommended patterns include:

  • Enforcing non-null, non-empty constraints for any secret used in HMAC or similar authentication schemes.
  • Implementing configuration validation that prevents enabling webhook endpoints unless a strong secret is set.
  • Using separate, randomly generated secrets for each application or integration, stored in a secure configuration store.
  • Designing authentication logic to fail closed: if a secret is missing or invalid, reject all webhook requests by default.
  • Applying defense-in-depth by limiting which actions unauthenticated webhook requests can trigger and using least privilege for deployment agents.

How teams detect issues like this

Effective detection combines configuration analysis with code-level review:

  • Static analysis or code review to identify uses of hash_hmac() (or similar APIs) where keys can be null, empty, or otherwise non-secret.
  • Configuration audits to flag applications or environments where webhook secrets are unset, null, or default-valued.
  • Runtime monitoring and alerting on webhook endpoints for unusually frequent or anomalous deployment triggers from unexpected IP ranges or sources.
  • Policy enforcement in CI/CD pipelines that require validated secrets and authentication checks before allowing deployment actions to proceed.

Sources

SourceLink
github.comgithub.com/coollabsio/coolify/security/advisories/GHSA-w8wm-r924-f65v

Frequently asked

questions

Exploitability depends on exposure of the webhook endpoint and whether the manual_webhook_secret_github is null. If the endpoint is reachable and the secret is unset, any attacker who can send HTTP requests to it can forge valid signatures.

An attacker only needs network access to the Coolify webhook URL. They do not require GitHub credentials or knowledge of any secret when the field is null because the effective HMAC key is the empty string.

Require a strong, non-null secret for all webhook authentication, validate it at configuration time, and have the authentication logic fail closed if the secret is missing or invalid so webhook-triggered actions are never executed without proper verification.

Treat all authentication secrets as mandatory, avoid nullable or default-weak values, implement configuration validation and unit tests around auth logic, and include security-focused code review steps that scrutinize the use of cryptographic APIs and default behaviors.

Find out what's already
exploitable in your codebase.