GHSA-26rh-24rg-j3vv: Goploy: Cross-namespace IDOR and RCE via body-supplied row id in project and project_file handlers
Summary
Project.AddFile, Project.EditFile, Project.RemoveFile, and Project.Edit in cmd/server/api/project/handler.go accept a project or project-file row id from the JSON body and act on it without checking that the project belongs to the caller's namespace. The corresponding model.ProjectFile.GetData and model.Project.GetData queries filter only by row id. A user holding the manager role (or any role that includes the FileSync / EditProject permission) in their own namespace can read, write, or delete files in any project across the install, and can rewrite any project's git remote URL by submitting the foreign id in the body. The git-URL primitive escalates to RCE on the next deploy because Edit runs git remote set-url on the project's working tree.
Affected
zhenorzz/goploy develop HEAD as of 2026-05-27. Verified against the zhenorzz/goploy:1.17.5 Docker image (docker.io/zhenorzz/goploy@sha256:69d08e1d16d7a7167426c89456c4bcef8e077a16554a4067ff258fff26d5cd44).
The four handlers and the model lookups have been in this shape across the file API and project metadata API.
Vulnerable code
cmd/server/api/project/handler.go::AddFile (creates file under any project's directory; body controls projectId):
func (Project) AddFile(gp *server.Goploy) server.Response {
type ReqData struct {
ProjectID int64 json:"projectId" validate:"required,gt=0"
Content string json:"content" validate:"required"
Filename string json:"filename" validate:"required"
}
var reqData ReqData
if err := gp.Decode(&reqData); err != nil { ... }
filePath := path.Join(config.GetProjectFilePath(reqData.ProjectID), reqData.Filename)
// ... os.Create(filePath); file.WriteString(reqData.Content)
id, err := model.ProjectFile{ProjectID: reqData.ProjectID, Filename: reqData.Filename}.AddRow()
}
cmd/server/api/project/handler.go::EditFile (overwrites file content; body controls file id, server derives project from the file row):
func (Project) EditFile(gp *server.Goploy) server.Response {
type ReqData stru
Details
Original advisory: https://github.com/advisories/GHSA-26rh-24rg-j3vv
Referenced CVEs
| CVE | CSIRTS overview | External |
|---|---|---|
| CVE-2026-53552 | coverage & exploitation status | NVD · CVE.org |
More from GitHub Security Advisories
- criticalGHSA-g936-7jqj-mwv8: TSDProxy: Internal proxy auth token forwarded to backend services enables management API …2026-07-10
- highGHSA-fpg8-7664-jc5q: melange: Incomplete package integrity verification allows data section substitution2026-07-10
- mediumGHSA-48rx-c7pg-q66r: Excon does not redact additional sensitive/risky headers when following redirects2026-07-10
- highGHSA-h4g2-xfmw-q2c9: Clauster: Non-loopback deployments can serve the dashboard unauthenticated when auth.enab…2026-07-10
- mediumGHSA-rqq5-2gf9-4w4q: Secure Headers: CSP directive injection via sandbox, plugin_types, and report_to when giv…2026-07-10