FastGPT is an AI Agent building platform. In versions 4.14.8.3 and below, the fastgpt-preview-image.yml workflow is vulnerable to arbitrary code execution and secret exfiltration by any external contributor. It uses pull_request_target (which runs with access to repository secrets) but checks out code from the pull request author's fork, then builds and pushes Docker images using attacker-controlled Dockerfiles. This also enables a supply chain attack via the production container registry. A patch was not available at the time of publication.
The fastgpt-preview-image.yml workflow uses the pull_request_target trigger, which executes in the context of the base repository with access to its secrets. Simultaneously, source code is retrieved from the pull request author's fork, meaning an attacker can provide their own malicious Dockerfile. The Docker image building and publishing process is performed using a file controlled by the attacker, allowing execution of arbitrary commands in the CI/CD environment and interception of repository secrets. Additionally, since the built image is pushed to a production container registry, a supply chain attack is possible.
An attacker can execute arbitrary code in the CI/CD environment, compromise repository secrets (e.g., tokens, API keys), and introduce a malicious image into the production container registry, potentially compromising the entire software supply chain.
At the time of vulnerability publication, a patch was not available. It is recommended to monitor the official FastGPT project repository and security advisory at https://github.com/labring/FastGPT/security/advisories/GHSA-xfx8-w35j-485c for patch availability information. As interim measures, consider restricting pull request submissions from external contributors or disabling the vulnerable workflow until a patch is released.
FastGPT (Fastgpt platform) versions 4.14.8.3 and earlier
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:XFastgpt
APPFastgpt≤ 4.14.8.3
Related vulnerabilities
NoSQL Injection w FastGPT umożliwia pominięcie uwierzytelnienia
FastGPT: nieuwierzytelniony endpoint proxy HTTP umożliwia SSRF
FastGPT is an AI Agent building platform. In versions prior to 4.14.9.5, the password change endpoint is vulne...
FastGPT is an AI Agent building platform. Prior to version 4.14.9.5, FastGPT's MCP (Model Context Protocol) to...
FastGPT to platforma do budowania AI Agent. Przed wersją 4.14.10.4 luka w kontroli dostępu (IDOR/BOLA) pozwala...