CVE-2023-46402

Description

A flaw was found in the git-urls package. This issue occurs when a long input is provided inside the directory path of the git url. This could lead to loading delays or a regular expression denial of service.

Statement

This vulnerability in the git-urls package requires an attacker to provide malicious input to the git URL parsing function. In Red Hat OpenShift GitOps deployments, git repository URLs are configured exclusively by platform administrators through Application and ApplicationSet custom resources. End users do not have the ability to inject arbitrary git URLs through any exposed API. The attack surface is limited to trusted administrators who already have elevated cluster privileges.

Mitigation

To reduce exposure to this vulnerability in OpenShift GitOps:
1. Limit Application and ApplicationSet creation to platform administrators using RBAC.
2. Configure ArgoCD AppProjects with explicit sourceRepos allowlists. Avoid wildcard (*) sources.
3. Use ApplicationSet resource policies to prevent user-provided git URLs from being templated into Applications.
4. In order to Audit which Git repositories are used by GitOps and
Validate no untrusted repos are configured use: `oc get applications -A -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.source.repoURL}{"\n"}{end}'`

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score4.37.5N/A
Attack VectorNetworkNetworkN/A
Attack ComplexityLowLowN/A
Privileges RequiredNoneNoneN/A
User InteractionRequiredNoneN/A
ScopeUnchangedUnchangedN/A
ConfidentialityNoneNoneN/A
Integrity ImpactNoneNoneN/A
Availability ImpactLowHighN/A

Vector

Red Hat: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L

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

Red Hat CVSS v3 Score Explanation

UI:R Someone has to navigate to the malicious URL. A:L There is no total loss of availability, only delays.

Understanding the Weakness (CWE)

Availability

Technical Impact: DoS: Crash, Exit, or Restart; DoS: Resource Consumption (CPU); DoS: Resource Consumption (Memory)

An attacker could provide unexpected values and cause a program crash or arbitrary control of resource allocation, leading to excessive consumption of resources such as memory and CPU.

Confidentiality

Technical Impact: Read Memory; Read Files or Directories

An attacker could read confidential data if they are able to control resource references.

Integrity,Confidentiality,Availability

Technical Impact: Modify Memory; Execute Unauthorized Code or Commands

An attacker could use malicious input to modify data or possibly alter control flow in unexpected ways, including arbitrary command execution.

Frequently Asked Questions

Want to get errata notifications? Sign up here.