Skip to content

GO-2025-3547 CVE-2024-7598 GHSA-r56h-j38w-hrqq

Kubernetes kube-apiserver Vulnerable to Race Condition in k8s.io/kubernetes

Low Go
Severity
3.1 / 10
Low · CVSS 3.1
Exploit chance (EPSS)
0.32%
Chance of exploitation in the next 30 days. Higher than 25.07% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Fix
None yet
No fixed version published

Description

Kubernetes kube-apiserver Vulnerable to Race Condition in k8s.io/kubernetes

Affected versions

Go

PackageVulnerableFixed in
k8s.io/kubernetes
>= 1.3.0
No fix yet
k8s.io/kubernetes/cmd/kube-apiserver
>= 1.3.0, <= 1.32.3
No fix yet

How to fix

No fixed version has been published yet. Until one is, remove or replace the package, or turn off or isolate the affected feature. This page updates when a fix ships.

Severity breakdown

CVSS 3.1 3.1

CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N

Attack vector
Adjacent
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

Weakness

CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.

How to prevent it
  • Architecture and Design: In languages that support it, use synchronization primitives. Only wrap these around critical code to minimize the impact on performance.
  • Architecture and Design: Use thread-safe capabilities such as the data access abstraction in Spring.
  • Architecture and Design: Minimize the usage of shared resources in order to remove as much complexity as possible from the control flow and to reduce the likelihood of unexpected conditions occurring. Additionally, this will minimize the amount of synchronization necessary and may even help to reduce the likelihood of a denial of service where an attacker may be able to repeatedly trigger a critical section (CWE-400).
  • Implementation: When using multithreading and operating on shared variables, only use thread-safe functions.
  • Implementation: Use atomic operations on shared variables. Be wary of innocent-looking constructs such as "x++". This may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read, followed by a computation, followed by a write.
  • Implementation: Use a mutex if available, but be sure to avoid related weaknesses such as CWE-412.
  • Implementation: Avoid double-checked locking (CWE-609) and other implementation errors that arise when trying to avoid the overhead of synchronization.
  • Implementation: Disable interrupts or signals over critical parts of the code, but also make sure that the code does not go into a large or infinite loop.
  • Implementation: Use the volatile type modifier for critical variables to avoid unexpected compiler optimization or reordering. This does not necessarily solve the synchronization problem, but it can help.
  • Architecture and Design, Operation: Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-r6j8-c6r2-37rr
kube-controller-manager is vulnerable to half-blind Server Side Request Forgery through in-tree Portworx StorageClass
Medium Also affects k8s.io/kubernetes
GHSA-4x4m-3c2p-qppc
Kubernetes Nodes can delete themselves by adding an OwnerReference
Medium Also affects k8s.io/kubernetes
GHSA-hj2p-8wj8-pfq4
kubernetes allows nodes to bypass dynamic resource allocation authorization checks
Low Also affects k8s.io/kubernetes
GHSA-3wgm-2gw2-vh5m
Kubernetes GitRepo Volume Inadvertent Local Repository Access
Medium Also affects k8s.io/kubernetes
GHSA-vv39-3w5q-974q
Kubernetes allows Command Injection affecting Windows nodes via nodes/*/logs/query API
Medium Also affects k8s.io/kubernetes
GHSA-jgfp-53c3-624w
Node Denial of Service via kubelet Checkpoint API
Medium Also affects k8s.io/kubernetes
GHSA-27wf-5967-98gx
Kubernetes kubelet arbitrary command execution
High Also affects k8s.io/kubernetes
GHSA-h7wq-jj8r-qm7p
Kubernetes Nil pointer dereference in KCM after v1 HPA patch request
High Also affects k8s.io/kubernetes
Is this in your code?

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