CVE Vulnerabilities

CVE-2025-27144

Allocation of Resources Without Limits or Throttling

Published: Feb 24, 2025 | Modified: Feb 24, 2025
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
RedHat/V2
RedHat/V3
7.5 MODERATE
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Ubuntu
MEDIUM

Go JOSE provides an implementation of the Javascript Object Signing and Encryption set of standards in Go, including support for JSON Web Encryption (JWE), JSON Web Signature (JWS), and JSON Web Token (JWT) standards. In versions on the 4.x branch prior to version 4.0.5, when parsing compact JWS or JWE input, Go JOSE could use excessive memory. The code used strings.Split(token, .) to split JWT tokens, which is vulnerable to excessive memory consumption when processing maliciously crafted tokens with a large number of . characters. An attacker could exploit this by sending numerous malformed tokens, leading to memory exhaustion and a Denial of Service. Version 4.0.5 fixes this issue. As a workaround, applications could pre-validate that payloads passed to Go JOSE do not contain an excessive number of . characters.

Weakness

The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.

Affected Software

Name Vendor Start Version End Version
Red Hat Enterprise Linux 9 RedHat opentelemetry-collector-0:0.107.0-8.el9_5 *
Red Hat OpenShift Container Platform 4.17 RedHat podman-5:5.2.2-4.rhaos4.17.el9 *
Red Hat OpenShift Container Platform 4.17 RedHat skopeo-2:1.16.1-1.rhaos4.17.el8 *
Red Hat OpenShift Container Platform 4.17 RedHat openshift4/ose-aws-pod-identity-webhook-rhel9:v4.17.0-202503142136.p0.g80efc4e.assembly.stream.el9 *
Red Hat OpenShift Container Platform 4.17 RedHat openshift4/ose-azure-workload-identity-webhook-rhel9:v4.17.0-202503181705.p0.g0e19a4f.assembly.stream.el9 *
Red Hat OpenShift Container Platform 4.17 RedHat ose-cloud-credential-operator-container-v4.17.0-202503182004.p0.g3ba961d.assembly.stream.el9 *
Red Hat OpenShift Container Platform 4.18 RedHat openshift4/ose-aws-pod-identity-webhook-rhel9:v4.18.0-202503130333.p0.gf54f9a1.assembly.stream.el9 *
Red Hat OpenShift Container Platform 4.18 RedHat openshift4/ose-azure-workload-identity-webhook-rhel9:v4.18.0-202503172004.p0.gd1dc8ab.assembly.stream.el9 *
Red Hat OpenShift Container Platform 4.18 RedHat openshift4/ose-cloud-credential-rhel9-operator:v4.18.0-202503181802.p0.g7785eb4.assembly.stream.el9 *
Red Hat OpenShift Container Platform 4.18 RedHat podman-5:5.2.2-6.rhaos4.18.el9 *
Red Hat OpenShift Container Platform 4.18 RedHat skopeo-2:1.16.1-1.rhaos4.18.el9 *
RHOL-6.0-RHEL-9 RedHat openshift-logging/cluster-logging-operator-bundle:v6.0.6-8 *
RHOL-6.0-RHEL-9 RedHat openshift-logging/cluster-logging-rhel9-operator:v6.0.6-4 *
RHOL-6.0-RHEL-9 RedHat openshift-logging/eventrouter-rhel9:v0.4.0-357 *
RHOL-6.0-RHEL-9 RedHat openshift-logging/log-file-metric-exporter-rhel9:v1.1.0-338 *
RHOL-6.0-RHEL-9 RedHat openshift-logging/logging-loki-rhel9:v3.4.2-7 *
RHOL-6.0-RHEL-9 RedHat openshift-logging/loki-operator-bundle:v6.0.6-10 *
RHOL-6.0-RHEL-9 RedHat openshift-logging/loki-rhel9-operator:v6.0.6-6 *
RHOL-6.0-RHEL-9 RedHat openshift-logging/lokistack-gateway-rhel9:v0.1.0-753 *
RHOL-6.0-RHEL-9 RedHat openshift-logging/opa-openshift-rhel9:v0.1.0-370 *
RHOL-6.0-RHEL-9 RedHat openshift-logging/vector-rhel9:v0.37.1-35 *
RHOL-6.1-RHEL-9 RedHat openshift-logging/cluster-logging-operator-bundle:v6.1.4-10 *
RHOL-6.1-RHEL-9 RedHat openshift-logging/cluster-logging-rhel9-operator:v6.1.4-5 *
RHOL-6.1-RHEL-9 RedHat openshift-logging/eventrouter-rhel9:v0.4.0-356 *
RHOL-6.1-RHEL-9 RedHat openshift-logging/log-file-metric-exporter-rhel9:v1.1.0-337 *
RHOL-6.1-RHEL-9 RedHat openshift-logging/logging-loki-rhel9:v3.4.2-6 *
RHOL-6.1-RHEL-9 RedHat openshift-logging/loki-operator-bundle:v6.1.4-13 *
RHOL-6.1-RHEL-9 RedHat openshift-logging/loki-rhel9-operator:v6.1.4-7 *
RHOL-6.1-RHEL-9 RedHat openshift-logging/lokistack-gateway-rhel9:v0.1.0-752 *
RHOL-6.1-RHEL-9 RedHat openshift-logging/opa-openshift-rhel9:v0.1.0-369 *
RHOL-6.1-RHEL-9 RedHat openshift-logging/vector-rhel9:v0.37.1-34 *

Extended Description

Code frequently has to work with limited resources, so programmers must be careful to ensure that resources are not consumed too quickly, or too easily. Without use of quotas, resource limits, or other protection mechanisms, it can be easy for an attacker to consume many resources by rapidly making many requests, or causing larger resources to be used than is needed. When too many resources are allocated, or if a single resource is too large, then it can prevent the code from working correctly, possibly leading to a denial of service.

Potential Mitigations

  • Assume all input is malicious. Use an “accept known good” input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.

  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, “boat” may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as “red” or “blue.”

  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code’s environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

  • Mitigation of resource exhaustion attacks requires that the target system either:

  • The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question.

  • The second solution can be difficult to effectively institute – and even when properly done, it does not provide a full solution. It simply requires more resources on the part of the attacker.

  • If the program must fail, ensure that it fails gracefully (fails closed). There may be a temptation to simply let the program fail poorly in cases such as low memory conditions, but an attacker may be able to assert control before the software has fully exited. Alternately, an uncontrolled failure could cause cascading problems with other downstream components; for example, the program could send a signal to a downstream process so the process immediately knows that a problem has occurred and has a better chance of recovery.

  • Ensure that all failures in resource allocation place the system into a safe posture.

  • Use resource-limiting settings provided by the operating system or environment. For example, when managing system resources in POSIX, setrlimit() can be used to set limits for certain types of resources, and getrlimit() can determine how many resources are available. However, these functions are not available on all operating systems.

  • When the current levels get close to the maximum that is defined for the application (see CWE-770), then limit the allocation of further resources to privileged users; alternately, begin releasing resources for less-privileged users. While this mitigation may protect the system from attack, it will not necessarily stop attackers from adversely impacting other users.

  • Ensure that the application performs the appropriate error checks and error handling in case resources become unavailable (CWE-703).

References