NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
LOW severity

Guard Core: Whitespace-collapse preprocessing permanently disables the CRLF-anchored http-splitting and command-injection detectors in the default detection modeGHSA-w7wg-6q7v-44f2

LOWFix: Guard-Core/guard-core#68

GHSA-w7wg-6q7v-44f2 is a low-severity (CVSS 3.7) CWE-693 vulnerability in guard-core. A fix is available for guard-core — see the affected versions and patch details below.

Also known asCVE-2026-129303
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 19, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.

Exploitation and automatability from CISA’s SSVC triage for GHSA-w7wg-6q7v-44f2.

EPSS Exploitation Probability

via FIRST.org ↗
0.3%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs26th percentile — riskier than 26% of all scored CVEsHighest risk

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected
🐍guard-core

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

Summary

In the default "enhanced" detection mode, ContentPreprocessor.preprocess() collapses all whitespace (re.sub(r"\s+", " ", content), guard_core/detection_engine/preprocessor.py:137 on master 08780f1; :384 in the 3.12.0 sdist) before pattern matching. This erases every \r and \n from the scanned value, rendering two built-in detectors structurally unmatchable regardless of input:

  • http_split — guard_core/handlers/suspatterns_handler.py:540: r"[\r\n]\s*(?:HTTP\/[0-9.]+|Location:|Set-Cookie:)" requires a literal \r or \n, which no longer exists after preprocessing;
  • cmd_injection — r"\n\s*(?:bash|sh|...)\s+-c\b" — same structural death.

The downstream application receives the raw value with CRLF intact (Starlette percent-decodes %0d%0a in query parameters before the adapter passes request.query_params.items() to guard_core/utils.py:843-865), so a response-splitting-shaped payload passes detection unflagged.

Details

Verified end-to-end against a real uvicorn server running the fastapi-guard adapter over guard-core 3.12.0, default config:

request (?q=)status
value%0d%0aHTTP%2F1.1+200+OK%0d%0aSet-Cookie%3A+pwned%3D1 (decoded to literal CRLF by the framework)200 — missed
' OR 1=1--400 — blocked (detection otherwise working)
1 UNION SELECT password FROM users--400 — blocked
; cat /etc/passwd400 — blocked

The legacy mode (no SecurityConfig detection attributes) skips preprocessing and catches the same decoded CRLF payload — the gap is specific to the enhanced-mode preprocessing pipeline, which every stock SecurityConfig activates. Contrast: every other preprocessing step (URL/HTML/hex/base64 decode) transforms toward what the attacker means; whitespace collapse is the one step that removes signal the detectors were written to require.

PoC

import asyncio
import httpx
import uvicorn
from fastapi import FastAPI
from guard.adapters import SecurityMiddleware  # fastapi-guard adapter over guard-core
from guard_core.models import SecurityConfig
from starlette.middleware import Middleware

app = FastAPI(middleware=[Middleware(
    SecurityMiddleware, config=SecurityConfig(enable_redis=False))])

@app.get("/search")
async def search(q: str = "") -> dict:
    return {"len": len(q)}

async def main() -> None:
    server = uvicorn.Server(uvicorn.Config(app, host="127.0.0.1", port=8995, log_level="error"))
    task = asyncio.create_task(server.serve())
    for _ in range(50):
        if server.started:
            break
        await asyncio.sleep(0.1)
    async with httpx.AsyncClient() as client:
        r = await client.get("http://127.0.0.1:8995/search",
            params={"q": "value%0d%0aHTTP%2F1.1+200+OK%0d%0aSet-Cookie%3A+pwned%3D1"})
        print("CRLF payload:", r.status_code, "(200 = missed)")
        r2 = await client.get("http://127.0.0.1:8995/search", params={"q": "' OR 1=1--"})
        print("SQLi control:", r2.status_code, "(400 = detection works)")
    server.should_exit = True
    await task

asyncio.run(main())
# Output: CRLF payload: 200 (missed) / SQLi control: 400 (blocked)

Impact

A detection bypass in a WAF/defense-in-depth layer: payloads shaped like HTTP response splitting (or newline-anchored command injection) are not flagged in the default mode, while other attack classes are. Not directly exploitable against Starlette/uvicorn-backed apps (they reject CRLF in response headers); the residual risk is for apps behind other stacks or apps that persist and re-emit the value where a CRLF-tolerant parser exists.

Fix: preserve \r\n during whitespace collapse (collapse only [ \t]+), or run the newline-anchored patterns against the pre-collapse content.

Reporter validation request

The fix ships in guard-core 3.13.0, now on PyPI. If you reported this issue, please install 3.13.0 and confirm it is resolved. You can reply in this advisory's discussion thread or open a new issue with the result.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIguard-core≥ 1.0.0&&< 3.13.03.13.0pip install --upgrade 'guard-core==3.13.0'

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for guard-core, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update guard-core to 3.13.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-w7wg-6q7v-44f2 is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

Frequently Asked Questions

### Summary In the default "enhanced" detection mode, `ContentPreprocessor.preprocess()` collapses all whitespace (`re.sub(r"\s+", " ", content)`, `guard_core/detection_engine/preprocessor.py:137` on master `08780f1`; `:384` in the 3.12.0 sdist) **before** pattern matching. This erases every `\r` and `\n` from the scanned value, rendering two built-in detectors structurally unmatchable regardless of input: - http_split — `guard_core/handlers/suspatterns_handler.py:540`: `r"[\r\n]\s*(?:HTTP\/[0-9.]+|Location:|Set-Cookie:)"` requires a literal `\r` or `\n`, which no longer exists after preproc
O3 Security · Impact-Aware SCA

Is GHSA-w7wg-6q7v-44f2 in your dependencies?

Find it across PyPI, including transitive dependencies.

Guard Core: Whitespace-collapse preprocessing…