CVE-2023-26125
High · 7.3CVSS
7.3
EPSS
0.9%
Published
May 4, 2023
CISA due date
—
Cloudanix analysis
A flaw in a popular web framework lets attackers tamper with how web content is stored and served by sending specially made requests, which could mislead users or open doors to bigger problems until the software is updated.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Tampering
- Component
- Library
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The vulnerability allows an attacker to supply a malicious X-Forwarded-Prefix header that bypasses input validation, enabling manipulation of cached responses and potential cache poisoning in applications using the affected gin-gonic/gin versions before 1.9.0.
Why it matters to the business
Organizations relying on gin-based services or dependent components such as GitLab may experience degraded trust in cached content, increased risk of serving incorrect or attacker-controlled responses to users, and exposure to follow-on attacks that leverage this vector, with remediation required across widespread open-source dependencies.
How an attack unfolds
An attacker crafts a request containing a specially formatted X-Forwarded-Prefix header and sends it to a vulnerable gin-based application; if the header influences routing or caching logic, the server stores or serves poisoned cache entries that can affect subsequent users or enable further exploitation depending on server configuration.
How to fix it
Upgrade gin-gonic/gin to commit ea03e10384502e1baf6f560a2b0ea32c342ede5b or later (version 1.9.0+). For GitLab deployments, apply the fixes in commits 6d037533ce72e8b309efcb41b2801a3c8244789d or 1ca31874e42fbd4b99f6e3c9174a992c053c8e1b. Validate that application code no longer trusts or uses the X-Forwarded-Prefix header without sanitization.
How to confirm the fix worked
Confirm the installed gin version meets or exceeds the fixed commit, review application configuration and middleware for header handling, and test with crafted X-Forwarded-Prefix requests to ensure responses are no longer influenced by untrusted prefix values.
Typical attack path
- Identify a target application using an affected version of gin-gonic/gin
- Craft and send an HTTP request with a malicious X-Forwarded-Prefix header
- Observe whether the response or cache behavior reflects the injected prefix value
- Leverage successful poisoning to deliver altered content or chain into higher-impact vulnerabilities
How to detect it
Review web server and application logs for requests containing the X-Forwarded-Prefix header with unexpected or encoded values; inspect cache logs or response headers for signs of prefix manipulation; correlate with any observed cache hit anomalies or content discrepancies.
What your security team should do
- Prioritize upgrade of all gin-gonic/gin instances to the fixed commit within standard patch cycles given the low EPSS and non-KEV status
- Audit dependent projects including GitLab installations for the listed fixed commits
- Implement input sanitization or header stripping for X-Forwarded-Prefix at the reverse proxy or application edge
- Monitor for any new exploit code or chaining attempts given the ExploitAvailable maturity
The record
Versions of the package github.com/gin-gonic/gin before 1.9.0 are vulnerable to Improper Input Validation by allowing an attacker to use a specially crafted request via the X-Forwarded-Prefix header, potentially leading to cache poisoning. **Note:** Although this issue does not pose a significant threat on its own it can serve as an input vector for other more impactful vulnerabilities. However, successful exploitation may depend on the server configuration and whether the header is used in the application logic.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Go | github.com/gin-gonic/gin | 0 | 1.9.0 |
| Debian:11 | golang-github-gin-gonic-gin | 0 | No fix |
| Debian:12 | golang-github-gin-gonic-gin | 0 | No fix |
| Debian:13 | golang-github-gin-gonic-gin | 0 | No fix |
| Debian:14 | golang-github-gin-gonic-gin | 0 | 1.8.1-3 |
| Ubuntu:18.04:LTS | golang-github-gin-gonic-gin | 0 | No fix |
| Ubuntu:20.04:LTS | golang-github-gin-gonic-gin | 0 | No fix |
| Ubuntu:22.04:LTS | golang-github-gin-gonic-gin | 0 | No fix |
| Ubuntu:24.04:LTS | golang-github-gin-gonic-gin | 0 | No fix |
| Ubuntu:24.10 | golang-github-gin-gonic-gin | 0 | No fix |
| Ubuntu:25.04 | golang-github-gin-gonic-gin | 0 | No fix |
| Ubuntu:25.10 | golang-github-gin-gonic-gin | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | golang-github-gin-gonic-gin | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | golang-github-gin-gonic-gin | 0 | No fix |
Related vulnerabilities
- CVE-2026-63339 IXP Manager is a full-stack web application for managing Internet Exchange Points. CWE-20
- CVE-2026-62958 libriscv is a RISC-V sandbox and emulator. CWE-20
- CVE-2026-119342 Stirling-PDF is a locally hosted web application that facilitates various operations on… CWE-20
- CVE-2026-119339 Tesseract is an open source OCR engine. CWE-20
- CVE-2026-62335 OpenVM is a performant and modular zkVM framework built for customization and… CWE-20
- CVE-2026-62337 SNARK Verifier is a generic (S)NARK verifier. CWE-20
- CVE-2026-62333 OpenVM is a performant and modular zkVM framework built for customization and… CWE-20
- CVE-2026-61618 SNARK Verifier is a generic (S)NARK verifier. CWE-20