Share
## https://sploitus.com/exploit?id=FA95D19B-D3C0-5E81-9781-CFB286B3F87C
# CVE-2026-31908 - Apache APISIX Header Injection Exploit

[![Severity](https://img.shields.io/badge/severity-CRITICAL-red)](https://nvd.nist.gov/vuln/detail/CVE-2026-31908)
[![CVSS](https://img.shields.io/badge/CVSS-10.0-critical)](https://nvd.nist.gov/vuln/detail/CVE-2026-31908)
[![Python](https://img.shields.io/badge/python-3.x-blue)](https://www.python.org/)
[![License](https://img.shields.io/badge/license-Educational%20Only-yellow)]()

## ๐Ÿ“‹ Overview

This is a **Proof of Concept (PoC)** exploit for **CVE-2026-31908**, a critical header injection vulnerability discovered in **Apache APISIX** versions `2.12.0` through `3.15.0`.

The vulnerability exists in the `forward-auth` plugin, where improper sanitization of CRLF (`\r\n`) sequences allows unauthenticated attackers to inject malicious HTTP headers. This can lead to **authentication bypass**, **privilege escalation**, and **unauthorized access** to protected resources.

> โš ๏ธ **IMPORTANT:** This tool is for **educational purposes and authorized security testing only**. Use only in isolated lab environments or on systems you own.

---

## ๐ŸŽฏ Vulnerability Details

| Attribute | Value |
|-----------|-------|
| **CVE ID** | CVE-2026-31908 |
| **Severity** | Critical |
| **CVSS Score** | 10.0 / 10 |
| **Attack Vector** | Network |
| **Attack Complexity** | Low |
| **Privileges Required** | None |
| **User Interaction** | None |
| **Confidentiality Impact** | High |
| **Integrity Impact** | High |
| **Weakness Type** | CWE-75 (Failure to Sanitize Special Elements) |

### Affected Versions
- Apache APISIX: **2.12.0** through **3.15.0**

### Patched Version
- Apache APISIX: **3.16.0** and above

---

## ๐Ÿ”ง Installation

### Prerequisites
- Python 3.6 or higher
- `requests` library

### Setup

```bash
# Clone the repository
git clone https://github.com/MehranTurk/CVE-2026-31908.git
cd CVE-2026-31908

# Install dependencies
pip install -r requirements.txt

# Make the script executable (Linux/macOS)
chmod +x CVE-2026-31908.py