joexbayer / c-web-modules

A modular web framework for C, inspired by kernel modules. Dynamically upload and compile C code at runtime to build REST APIs, WebSocket services, and more. Includes support for JSON (Jansson), SQLite, OpenSSL, and streaming large data efficiently.
GNU General Public License v3.0
184 stars 8 forks source link

Security: Header Injection Vulnerability #4

Open joexbayer opened 2 weeks ago

joexbayer commented 2 weeks ago

The current implementation does not sanitize headers or values. Attackers could exploit this to inject malicious headers (e.g., via newline characters).

  1. Add sanitization to prevent injection attacks.
  2. Reject headers with invalid characters or formats.