漏洞信息
# z80pack 易受工作流运行工件中 GITHUB_TOKEN 泄露的影响
## 漏洞概述
z80pack 是一个成熟的模拟器,支持多种使用 8080 和 Z80 CPU 的平台。在版本 1.38 及之前,存在一个漏洞可能导致 GitHub 访问令牌泄露。
## 影响版本
- z80pack 版本 1.38 及之前的版本
## 漏洞细节
`makefile-ubuntu.yml` 文件使用 `actions/upload-artifact@v4` 动作上传名为 `z80pack-ubuntu` 的构建产物。这个产物是一个压缩文件,其中包含了当前目录的内容,包括自动生成的 `.git/config` 文件。该文件中包含构建运行时使用的 GITHUB_TOKEN。
由于构建产物可以在工作流结束前下载,因此在几秒钟的时间内攻击者可以提取出该令牌并使用 GitHub API 来执行恶意操作,例如推送恶意代码或重写发布提交。
## 影响
- 攻击者可以从构建产物中提取 GITHUB_TOKEN
- 攻击者可能利用此令牌通过 GitHub API 推送恶意代码或重写仓库的发布提交
## 修复情况
该问题已在 `commit bd95916` 中得到修复。
备注
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
z80pack Vulnerable to Exposure of the GITHUB_TOKEN in Workflow Run Artifact
漏洞描述信息
z80pack is a mature emulator of multiple platforms with 8080 and Z80 CPU. In version 1.38 and prior, the `makefile-ubuntu.yml` workflow file uses `actions/upload-artifact@v4` to upload the `z80pack-ubuntu` artifact. This artifact is a zip of the current directory, which includes the automatically generated `.git/config` file containing the run's GITHUB_TOKEN. Seeing as the artifact can be downloaded prior to the end of the workflow, there is a few seconds where an attacker can extract the token from the artifact and use it with the Github API to push malicious code or rewrite release commits in your repository. This issue has been fixed in commit bd95916.
CVSS信息
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:H
漏洞类别
信息暴露