CVE-2024-31457

7.7 HIGH

📋 TL;DR

This CVE describes a code injection vulnerability in gin-vue-admin's plugin template feature where attackers can perform directory traversal via the plugName parameter. This allows creation of arbitrary folders and insertion of malicious Go code. All systems running vulnerable versions of gin-vue-admin are affected.

💻 Affected Systems

Products:
  • gin-vue-admin
Versions: Version 2.6.1 and earlier (specifically pseudoversion 0.0.0-20240407133540-7bc7c3051067 and earlier)
Operating Systems: All platforms running Go applications
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists in the Plugin System -> Plugin Template feature with controllable PlugName field.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data exfiltration, and persistent backdoor installation.

🟠

Likely Case

Arbitrary file creation and code injection allowing privilege escalation and unauthorized system modifications.

🟢

If Mitigated

Limited impact with proper input validation and directory restrictions in place.

🌐 Internet-Facing: HIGH - Web application with exploitable parameter accessible via HTTP requests.
🏢 Internal Only: MEDIUM - Still exploitable by authenticated users or attackers with internal access.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires access to the plugin template feature, which typically requires authentication. Specific PoC parameters exist for code injection.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Commit b1b7427c6ea6c7a027fa188c6be557f3795e732b (pseudoversion 0.0.0-20240409100909-b1b7427c6ea6)

Vendor Advisory: https://github.com/flipped-aurora/gin-vue-admin/security/advisories/GHSA-gv3w-m57p-3wc4

Restart Required: Yes

Instructions:

1. Update to commit b1b7427c6ea6c7a027fa188c6be557f3795e732b or later. 2. Pull latest changes from GitHub repository. 3. Rebuild and restart the gin-vue-admin application.

🔧 Temporary Workarounds

Input validation and filtering

all

Manually implement filtering to prevent directory traversal in the PlugName parameter

Implement input validation to reject paths containing '../' or similar traversal sequences
Restrict PlugName to alphanumeric characters only

🧯 If You Can't Patch

  • Disable the Plugin System -> Plugin Template feature entirely
  • Implement strict input validation and sanitization for the PlugName parameter

🔍 How to Verify

Check if Vulnerable:

Check if running version 2.6.1 or earlier, or pseudoversion before 0.0.0-20240409100909-b1b7427c6ea6

Check Version:

Check git commit hash or version in application configuration

Verify Fix Applied:

Verify application is running commit b1b7427c6ea6c7a027fa188c6be557f3795e732b or later

📡 Detection & Monitoring

Log Indicators:

  • Unusual plugin template creation attempts
  • Directory traversal patterns in plugName parameter
  • Creation of api/config/global/model/router/service/main.go folders

Network Indicators:

  • HTTP requests to plugin template endpoints with suspicious plugName values

SIEM Query:

web_requests WHERE (uri CONTAINS '/plugin/template' AND parameters CONTAINS '../') OR (uri CONTAINS '/plugin/template' AND parameters CONTAINS 'plugName=' AND (parameters CONTAINS '../' OR parameters CONTAINS '..\\'))

🔗 References

📤 Share & Export