VYPR
High severityNVD Advisory· Published May 5, 2022· Updated Apr 23, 2025

Privilege Escalation in argo-workflows

CVE-2022-29164

Description

Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. In affected versions an attacker can create a workflow which produces a HTML artifact containing an HTML file that contains a script which uses XHR calls to interact with the Argo Server API. The attacker emails the deep-link to the artifact to their victim. The victim opens the link, the script starts running. As the script has access to the Argo Server API (as the victim), so may read information about the victim’s workflows, or create and delete workflows. Note the attacker must be an insider: they must have access to the same cluster as the victim and must already be able to run their own workflows. The attacker must have an understanding of the victim’s system. We have seen no evidence of this in the wild. We urge all users to upgrade to the fixed versions.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
github.com/argoproj/argo-workflows/v3Go
>= 2.6.0, < 3.2.113.2.11
github.com/argoproj/argo-workflows/v3Go
>= 3.3.0, < 3.3.53.3.5

Affected products

1

Patches

1
87470e1c2bf7

fix: Added artifact Content-Security-Policy (#8585)

https://github.com/argoproj/argo-workflowsAlex CollinsMay 3, 2022via ghsa
3 files changed · +27 5
  • server/apiserver/argoserver.go+9 5 modified
    @@ -341,11 +341,15 @@ func (as *argoServer) newHTTPServer(ctx context.Context, port int, artifactServe
     		r.Header.Del("Connection")
     		webhookInterceptor(w, r, gwmux)
     	})
    -	mux.HandleFunc("/artifacts/", artifactServer.GetOutputArtifact)
    -	mux.HandleFunc("/input-artifacts/", artifactServer.GetInputArtifact)
    -	mux.HandleFunc("/artifacts-by-uid/", artifactServer.GetOutputArtifactByUID)
    -	mux.HandleFunc("/input-artifacts-by-uid/", artifactServer.GetInputArtifactByUID)
    -	mux.HandleFunc("/artifact-files/", artifactServer.GetArtifactFile)
    +
    +	// emergency environment variable that allows you to disable the artifact service in case of problems
    +	if os.Getenv("ARGO_ARTIFACT_SERVER") != "false" {
    +		mux.HandleFunc("/artifacts/", artifactServer.GetOutputArtifact)
    +		mux.HandleFunc("/input-artifacts/", artifactServer.GetInputArtifact)
    +		mux.HandleFunc("/artifacts-by-uid/", artifactServer.GetOutputArtifactByUID)
    +		mux.HandleFunc("/input-artifacts-by-uid/", artifactServer.GetInputArtifactByUID)
    +		mux.HandleFunc("/artifact-files/", artifactServer.GetArtifactFile)
    +	}
     	mux.Handle("/oauth2/redirect", handlers.ProxyHeaders(http.HandlerFunc(as.oAuth2Service.HandleRedirect)))
     	mux.Handle("/oauth2/callback", handlers.ProxyHeaders(http.HandlerFunc(as.oAuth2Service.HandleCallback)))
     	mux.HandleFunc("/metrics", func(w http.ResponseWriter, r *http.Request) {
    
  • server/artifacts/artifact_server.go+3 0 modified
    @@ -16,6 +16,7 @@ import (
     	"google.golang.org/grpc/status"
     	apierr "k8s.io/apimachinery/pkg/api/errors"
     	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    +	"k8s.io/utils/env"
     
     	"github.com/argoproj/argo-workflows/v3/persist/sqldb"
     	wfv1 "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1"
    @@ -409,6 +410,8 @@ func (a *ArtifactServer) returnArtifact(w http.ResponseWriter, art *wfv1.Artifac
     	key, _ := art.GetKey()
     	w.Header().Add("Content-Disposition", fmt.Sprintf(`filename="%s"`, path.Base(key)))
     	w.Header().Add("Content-Type", mime.TypeByExtension(path.Ext(key)))
    +	w.Header().Add("Content-Security-Policy", env.GetString("ARGO_ARTIFACT_CONTENT_SECURITY_POLICY", "sandbox; base-uri 'none'; default-src 'none'; img-src 'self'; style-src 'self'"))
    +	w.Header().Add("X-Frame-Options", env.GetString("ARGO_ARTIFACT_X_FRAME_OPTIONS", "SAMEORIGIN"))
     
     	_, err = io.Copy(w, stream)
     	if err != nil {
    
  • test/e2e/argo_server_test.go+15 0 modified
    @@ -1065,6 +1065,11 @@ func (s *ArgoServerSuite) TestArtifactServer() {
     		resp.Body().
     			Contains(":) Hello Argo!")
     
    +		resp.Header("Content-Security-Policy").
    +			Equal("sandbox; base-uri 'none'; default-src 'none'; img-src 'self'; style-src 'self'") // MSB
    +
    +		resp.Header("X-Frame-Options").
    +			Equal("SAMEORIGIN")
     	})
     
     	// In this case, the artifact name is a file
    @@ -1076,6 +1081,11 @@ func (s *ArgoServerSuite) TestArtifactServer() {
     		resp.Body().
     			Contains(":) Hello Argo!")
     
    +		resp.Header("Content-Security-Policy").
    +			Equal("sandbox; base-uri 'none'; default-src 'none'; img-src 'self'; style-src 'self'") // MSB
    +
    +		resp.Header("X-Frame-Options").
    +			Equal("SAMEORIGIN")
     	})
     
     	// In this case, the artifact name is a directory
    @@ -1110,6 +1120,11 @@ func (s *ArgoServerSuite) TestArtifactServer() {
     		resp.Body().
     			Contains(":) Hello Argo!")
     
    +		resp.Header("Content-Security-Policy").
    +			Equal("sandbox; base-uri 'none'; default-src 'none'; img-src 'self'; style-src 'self'") // MSB
    +
    +		resp.Header("X-Frame-Options").
    +			Equal("SAMEORIGIN")
     	})
     
     	// In this case, the artifact name is a file
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

6

News mentions

0

No linked articles in our index yet.