CVE-2024-10086
NoneCVSS
—
EPSS
0.4%
Published
Oct 30, 2024
CISA due date
—
Cloudanix analysis
A flaw in Consul lets attackers trick users into running harmful code in their browsers simply by clicking a specially crafted link, which could lead to stolen login details or unauthorized changes.
- Exploitation
- Requires User Interaction
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Application
- Class
- XSS
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Missing explicit Content-Type header on server responses allows attacker-controlled input to be interpreted by browsers as HTML or JavaScript, enabling reflected cross-site scripting.
Why it matters to the business
Attackers can hijack user sessions, steal credentials, or perform unauthorized actions within affected Consul deployments, increasing risk of data exposure and operational disruption in service discovery environments.
How an attack unfolds
An attacker crafts a malicious URL containing a script payload and tricks a user into accessing it; the server echoes the input without setting a safe Content-Type, causing the victim's browser to execute the script in the context of the Consul UI or API.
How to fix it
Upgrade hashicorp/consul to the fixed commit e694ba9b3f1c9f440350869e739d534532946920 or later release containing the explicit Content-Type header; apply the same update to all Consul Enterprise instances and verify header presence in responses after deployment.
How to confirm the fix worked
After upgrade, inspect HTTP responses from Consul endpoints for an explicit safe Content-Type header such as application/json or text/plain; retest previously vulnerable reflection points with benign payloads to confirm no script execution occurs.
Typical attack path
- Identify an endpoint in Consul that reflects user input in responses without setting Content-Type
- Craft a URL embedding a JavaScript payload designed to execute in the browser
- Deliver the link via phishing, malicious site, or social engineering
- Victim interaction triggers the reflected response, executing the payload
- Script performs actions such as cookie theft, form submission, or redirect
How to detect it
Search web server and application logs for requests containing common XSS patterns such as script tags or event handlers reflected in responses; examine browser console errors or unexpected JavaScript execution originating from Consul endpoints.
- reflected script or onerror= payloads in Consul HTTP request URIs
- absence of Content-Type header in responses from /v1/ or UI endpoints
- unexpected eval or document.cookie access in browser contexts tied to Consul domains
What your security team should do
- Prioritize upgrade of all Consul instances to the fixed commit within the next maintenance window
- Implement WAF rules or proxy configurations to enforce Content-Type headers on API responses as a temporary control
- Review and restrict user input reflection in any custom Consul integrations or templates
- Monitor for unusual script execution or unexpected redirects in browser telemetry from Consul UI users
The record
A vulnerability was identified in Consul and Consul Enterprise such that the server response did not explicitly set a Content-Type HTTP header, allowing user-provided inputs to be misinterpreted and lead to reflected XSS.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Go | github.com/hashicorp/consul | 1.4.1 | 1.20.0 |
| Bitnami | consul | 1.4.1 | 1.20.0 |
| Chainguard | consul-1.18-oci-entrypoint | 0 | 1.18.2-r44 |
| Chainguard | consul-1.18-oci-entrypoint-compat | 0 | 1.18.2-r44 |
| Chainguard | consul-1.19-oci-entrypoint | 0 | 1.19.2-r43 |
| Chainguard | consul-1.19-oci-entrypoint-compat | 0 | 1.19.2-r43 |
| Chainguard | consul-1.20 | 0 | 1.20.6-r11 |
| Chainguard | consul-1.20-oci-entrypoint | 0 | 1.20.6-r11 |
| Chainguard | consul-1.20-oci-entrypoint-compat | 0 | 1.20.6-r11 |
| Chainguard | consul-1.21 | 0 | 1.21.5-r6 |
| Chainguard | consul-1.21-oci-entrypoint | 0 | 1.21.5-r6 |
| Chainguard | consul-1.21-oci-entrypoint-compat | 0 | 1.21.5-r6 |
| Chainguard | consul-1.22 | 0 | 1.22.1-r2 |
| Chainguard | consul-1.22-oci-entrypoint | 0 | 1.22.1-r2 |
| Chainguard | consul-1.22-oci-entrypoint-compat | 0 | 1.22.1-r2 |
| Chainguard | consul-fips-1.19-oci-entrypoint | 0 | 1.19.2-r42 |
| Chainguard | consul-fips-1.19-oci-entrypoint-compat | 0 | 1.19.2-r42 |
| Chainguard | consul-fips-1.20 | 0 | 1.20.6-r10 |
| Chainguard | consul-fips-1.20-oci-entrypoint | 0 | 1.20.6-r10 |
| Chainguard | consul-fips-1.20-oci-entrypoint-compat | 0 | 1.20.6-r10 |
| Chainguard | consul-fips-1.21 | 0 | 1.21.5-r6 |
| Chainguard | consul-fips-1.21-oci-entrypoint | 0 | 1.21.5-r6 |
| Chainguard | consul-fips-1.21-oci-entrypoint-compat | 0 | 1.21.5-r6 |
| Chainguard | consul-fips-1.22 | 0 | 1.22.2-r1 |
| Chainguard | consul-fips-1.22-oci-entrypoint | 0 | 1.22.2-r1 |
| Chainguard | consul-fips-1.22-oci-entrypoint-compat | 0 | 1.22.2-r1 |
| Debian:11 | consul | 0 | No fix |
| SUSE:Linux Enterprise Module for Package Hub 15 SP5 | govulncheck-vulndb | 0 | 0.0.20241104T154416-150000.1.12.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP6 | govulncheck-vulndb | 0 | 0.0.20241104T154416-150000.1.12.1 |
| SUSE:Package Hub 12 | govulncheck-vulndb | 0 | 0.0.20241104T154416-5.1 |
| Ubuntu:18.04:LTS | consul | 0 | No fix |
| Ubuntu:20.04:LTS | consul | 0 | No fix |
| Ubuntu:22.04:LTS | consul | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | consul | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | consul | 0 | No fix |
| go | github.com/hashicorp/consul | 1.4.1 | 1.20.0 |
| openSUSE:Leap 15.5 | govulncheck-vulndb | 0 | 0.0.20241104T154416-150000.1.12.1 |
| openSUSE:Leap 15.6 | govulncheck-vulndb | 0 | 0.0.20241104T154416-150000.1.12.1 |
| openSUSE:Tumbleweed | govulncheck-vulndb | 0 | 0.0.20241104T154416-1.1 |
Related vulnerabilities
- GO-2025-4082 Consul event endpoint is vulnerable to denial of service in github.com/hashicorp/consul Also affects github.com/hashicorp/consul
- GO-2025-4081 Consul key/value endpoint is vulnerable to denial of service in… Also affects github.com/hashicorp/consul
- CVE-2025-11375 Consul event endpoint is vulnerable to denial of service Also affects github.com/hashicorp/consul
- CVE-2025-11374 Consul key/value endpoint is vulnerable to denial of service Also affects github.com/hashicorp/consul
- CVE-2024-10006 A vulnerability was identified in Consul and Consul Enterprise (“Consul”) such that using… Also affects github.com/hashicorp/consul
- CVE-2024-10005 A vulnerability was identified in Consul and Consul Enterprise (“Consul”) such that using… Also affects github.com/hashicorp/consul
- CVE-2025-65637 Logrus is vulnerable to DoS when using Entry.Writer() Also affects consul-1.18-oci-entrypoint
- CVE-2024-51744 golang-jwt is a Go implementation of JSON Web Tokens. Also affects consul-1.18-oci-entrypoint