Summary
ciguard: Web UI is missing HTTP defence-in-depth headers
ciguard's FastAPI Web UI (src/ciguard/web/app.py) does not set HTTP defence-in-depth headers. OWASP ZAP baseline scan flagged 11 alerts: missing Content-Security-Policy (Medium), X-Frame-Options (Medium), Sub-Resource-Integrity on /api/docs (Medium), COOP / COEP / CORP (Low), Permissions-Policy (Low), X-Content-Type-Options (Low).
Threat scenario
For local-only deployment (current intent): minimal, there's no untrusted browser context, no third-party hosting, no auth surface to protect.
For public hosting (PRD Slice 9 GitHub App or hosted dashboard, future): each missing header reduces a defence layer:
- Missing CSP → injected XSS would have no second-line defence (first-line Jinja autoescape remains intact)
- Missing X-Frame-Options → clickjacking against any UI button would be possible
- Missing SRI on jsdelivr-hosted Swagger UI → if jsdelivr were compromised, attacker JS would run in the docs page context
Discovery
Found by OWASP ZAP baseline scan during ciguard's first self-conducted pentest cycle, 2026-04-26.
CVSS Scoring
- CVSS v3.1:
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N, 4.3 (Medium per v3.1 thresholds) - CVSS v4.0:
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N, first.org calc 4.3 (Low); GitHub's calc 2.1 (Low). All consistent at Low/borderline.
Verification
$ curl -sI http://127.0.0.1:8080/ | grep -E '^(X-Frame|X-Content|Referrer|Permissions|Cross-Origin|Content-Security):'
# Pre-fix: empty
# Post-fix: 7 headers present
Resources
Impact
GHSA-7WW3-XVF5-CXWM has a CVSS score of 4.3 (Low). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.8.2); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
- New
SecurityHeadersMiddlewareatsrc/ciguard/web/security_headers.pyinjecting: X-Content-Type-Options nosniff, X-Frame-Options DENY, Referrer-Policy no-referrer, Permissions-Policyinterest-cohort=(), Cross-Origin-Opener-Policy same-origin, Cross-Origin-Resource-Policy same-origin, plus per-path CSP with/api/docs+/api/redoccarve-out for cdn.jsdelivr.net (Swagger UI / ReDoc dependency). - COEP intentionally NOT set: would break Swagger UI's cross-origin assets, and ciguard makes no SharedArrayBuffer use that would benefit.
- Registered via
app.add_middleware(SecurityHeadersMiddleware). - 6 regression tests in
tests/test_web.py::TestSecurityHeaders.
Frequently Asked Questions
- What is GHSA-7WW3-XVF5-CXWM? GHSA-7WW3-XVF5-CXWM is a low-severity security vulnerability in ciguard (pip), affecting versions >= 0.1.0, <= 0.8.1. It is fixed in 0.8.2.
- How severe is GHSA-7WW3-XVF5-CXWM? GHSA-7WW3-XVF5-CXWM has a CVSS score of 4.3 (Low). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of ciguard are affected by GHSA-7WW3-XVF5-CXWM? ciguard (pip) versions >= 0.1.0, <= 0.8.1 is affected.
- Is there a fix for GHSA-7WW3-XVF5-CXWM? Yes. GHSA-7WW3-XVF5-CXWM is fixed in 0.8.2. Upgrade to this version or later.
- Is GHSA-7WW3-XVF5-CXWM exploitable, and should I be worried? Whether GHSA-7WW3-XVF5-CXWM is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-7WW3-XVF5-CXWM is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-7WW3-XVF5-CXWM? Upgrade
ciguardto 0.8.2 or later.