CVE-2023-31873: Gin 0.7.4 allows execution of arbitrary code when a crafted file is opened, e.g., via require('child_process')
CVE-2023-31873 is a high-severity flaw (CVSS 7.8) affecting gin. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
Gin 0.7.4 allows execution of arbitrary code when a crafted file is opened, e.g., via require('child_process').
Why this priority
- High severity
- Public exploit reference
No fix is published yet: follow the downgrade or mitigation steps.
Risk facts
| CVSS score | 7.8 (High) |
| Attack vector | Local |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | Required |
| EPSS exploit chance | 1.3% (top 29%) |
| CISA exploited list | No |
| Published | 2023-05-28 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Public exploits and detection
Public code exists for this CVE. Treat unpatched systems as at risk, and only run PoCs in a lab.
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2023-31873?
gin: downgrade or apply the listed mitigation. Exact commands for each OS are on this page.
Is CVE-2023-31873 being exploited?
CVE-2023-31873 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2023-31873 affect?
CVE-2023-31873 affects gin. Severity is high (CVSS 7.8). Gin 0.7.4 allows execution of arbitrary code when a crafted file is opened, e.g., via require('child_process').
How urgent is CVE-2023-31873?
Priority 50/100. High severity; Public exploit reference
Related CVEs
- CVE-2023-29401 MEDIUM 4.3 UPGRADE The filename parameter of the Context.FileAttachment function is not properly sanitized
- CVE-2023-26125 MEDIUM 5.6 UPGRADE Versions of the package github.com/gin-gonic/gin before 1.9.0 are vulnerable to Improper Input Validation by a
- CVE-2020-36567 HIGH 7.5 UPGRADE Unsanitized input in the default logger in github.com/gin-gonic/gin before v1.6.0 allows remote attackers to i