Exploit database

GH-cff5fad62f42c25616a8237d66c8b2eb

achalbajpai/renovate-go

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2020-28483

4 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files7
achalbajpai/renovate-goRevision 8d192b3bae78

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

main.go

Go · 794 bytes
package main

import (
	"net/http"
	"time"

	"github.com/gin-gonic/gin"
)

func main() {
	// a simple gin server example with an potential vulnerability in older versions
	r := gin.Default()

	// main endpoint
	r.GET("/", func(c *gin.Context) {
		c.JSON(http.StatusOK, gin.H{
			"message": "Hello, World!",
			"time":    time.Now().Format(time.RFC3339),
		})
	})

	// file endpoint
	r.GET("/file/:filename", func(c *gin.Context) {
		filename := c.Param("filename")
		c.JSON(http.StatusOK, gin.H{
			"requested_file": filename,
			"message":        "This endpoint demonstrates potential vulnerability in older Gin versions",
		})
	})

	// health check
	r.GET("/health", func(c *gin.Context) {
		c.JSON(http.StatusOK, gin.H{
			"status": "healthy",
		})
	})

	// run the server
	r.Run(":8080")
}