{"id":"CVE-2024-31457","summary":"gin-vue-admin background arbitrary code coverage vulnerability","details":"gin-vue-admin is a backstage management system based on vue and gin, which separates the front and rear of the full stack. gin-vue-admin pseudoversion 0.0.0-20240407133540-7bc7c3051067, corresponding to version 2.6.1, has a code injection vulnerability in the backend. In the Plugin System -\u003e Plugin Template feature, an attacker can perform directory traversal by manipulating the `plugName` parameter. They can create specific folders such as `api`, `config`, `global`, `model`, `router`, `service`, and `main.go` function within the specified traversal directory. Moreover, the Go files within these folders can have arbitrary code inserted based on a specific PoC parameter. The main reason for the existence of this vulnerability is the controllability of the PlugName field within the struct. Pseudoversion 0.0.0-20240409100909-b1b7427c6ea6, corresponding to commit b1b7427c6ea6c7a027fa188c6be557f3795e732b, contains a patch for the issue. As a workaround, one may manually use a filtering method available in the GitHub Security Advisory to rectify the directory traversal problem.","aliases":["GHSA-gv3w-m57p-3wc4","GO-2024-2702"],"modified":"2026-04-18T04:14:42.754899Z","published":"2024-04-09T17:39:52.347Z","database_specific":{"cna_assigner":"GitHub_M","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/31xxx/CVE-2024-31457.json","cwe_ids":["CWE-22"]},"references":[{"type":"WEB","url":"https://pkg.go.dev/github.com/flipped-aurora/gin-vue-admin/server?tab=versions"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/31xxx/CVE-2024-31457.json"},{"type":"ADVISORY","url":"https://github.com/flipped-aurora/gin-vue-admin/security/advisories/GHSA-gv3w-m57p-3wc4"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-31457"},{"type":"FIX","url":"https://github.com/flipped-aurora/gin-vue-admin/commit/b1b7427c6ea6c7a027fa188c6be557f3795e732b"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/flipped-aurora/gin-vue-admin","events":[{"introduced":"0"},{"fixed":"b1b7427c6ea6c7a027fa188c6be557f3795e732b"}]},{"type":"GIT","repo":"https://github.com/flipped-aurora/gin-vue-admin","events":[{"introduced":"0"},{"fixed":"b1b7427c6ea6c7a027fa188c6be557f3795e732b"}]}],"versions":["V2.4.4","V2.5.0b","v0.9.0","v2.0.3","v2.2.0","v2.3.3","v2.3.31","v2.3.6","v2.4.2","v2.4.3","v2.4.4","v2.4.4-1","v2.4.5","v2.4.5Beta","v2.4.5RC","v2.4.6","v2.5.0","v2.5.0a","v2.5.1","v2.5.1b","v2.5.2","v2.5.3","v2.5.3b","v2.5.3beta","v2.5.4","v2.5.6","v2.5.6-a","v2.5.7","v2.5.7-a","v2.5.8","v2.5.9","v2.6.1","v2.6.2"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-31457.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:N/I:H/A:H"}]}