GHSA-wj6x-hcc2-f32j BIT-consul-2023-0845 CVE-2023-0845 GO-2023-1639
Consul Server Panic when Ingress and API Gateways Configured with Peering Connections
- Severity
- 6.5 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 1.00%
- Chance of exploitation in the next 30 days. Higher than 62.98% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-476 NULL Pointer Dereference
- Fix
1.14.5- Upgrade github.com/hashicorp/consul to this version or later
Description
A vulnerability was identified in Consul and Consul Enterprise (“Consul”) an authenticated user with service:write permissions could trigger a workflow that causes Consul server and client agents to crash under certain circumstances. To exploit this vulnerability, an attacker requires access to an ACL token with service:write permissions, and there needs to be at least one running ingress or API gateway that is configured to route traffic to an upstream service.
Affected versions
Go
| Package | Vulnerable | Fixed in |
|---|---|---|
| github.com/hashicorp/consul | >= 1.14.0, < 1.14.5 |
1.14.5 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
github.com/hashicorp/consul Go → 1.14.5
- go
go get github.com/hashicorp/consul@v1.14.5 && go mod tidy
Severity breakdown
CVSS 3.1 6.5
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Weakness
CWE-476: NULL Pointer Dereference
The product dereferences a pointer that it expects to be valid but is NULL.
How to prevent it
- Implementation: For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484].
- Requirements: Select a programming language that is not susceptible to these issues.
- Implementation: Check the results of all functions that return a value and verify that the value is non-null before acting upon it.
- Architecture and Design: Identify all variables and data stores that receive information from external sources, and apply input validation to make sure that they are only initialized to expected values.
- Implementation: Explicitly initialize all variables and other data stores, either during declaration or just before the first usage.
References
Advisories
Packages
Other links
- discuss.hashicorp.com/t/hcsec-2023-06-consul-server-panic-when-ingress-and-api-gateways-co…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LYZOK…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XNF4O…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZTE4I…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LYZOK…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XNF4O…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZTE4I…
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-cpfq-66p2-336j Consul is vulnerable to arbitrary file read when configured with Kubernetes authentication | Medium | Also affects github.com/hashicorp/consul |
| GHSA-qh7p-pfq3-677h Consul event endpoint is vulnerable to denial of service | Medium | Also affects github.com/hashicorp/consul |
| GHSA-7g3r-8c6v-hfmr Consul key/value endpoint is vulnerable to denial of service | Medium | Also affects github.com/hashicorp/consul |
| GHSA-99wr-c2px-grmh Hashicorp Consul Cross-site Scripting vulnerability | Medium | Also affects github.com/hashicorp/consul |
| GHSA-5c4w-8hhh-3c3h Hashicorp Consul Improper Neutralization of HTTP Headers for Scripting Syntax vulnerability | Medium | Also affects github.com/hashicorp/consul |
| GHSA-chgm-7r52-whjj Hashicorp Consul Path Traversal vulnerability | Medium | Also affects github.com/hashicorp/consul |
| GHSA-6m72-467w-94rh Privilege Escalation in HashiCorp Consul | Medium | Also affects github.com/hashicorp/consul |
| GHSA-496g-fr33-whrf Denial of service in HashiCorp Consul | High | Also affects github.com/hashicorp/consul |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor