Files
summercms/.planning/phases/19.7-generic-mcp-module/19.7-SECURITY.md
Jakub Zych 33faa44e53 docs(19.7-09): security contract with the gap-closure threats and corrected rows
T-19.7-42..T-19.7-65 join the register, the eight corrected rows carry
their fix commits, the audit trail records the gap closure; threats_open
stays 0 (every high threat is fixed or verified).
2026-10-23 18:54:06 +02:00

15 KiB

phase, slug, status, threats_open, asvs_level, created
phase slug status threats_open asvs_level created
19.7 generic-mcp-module verified 0 1 2026-10-23

Phase 19.7 — Security

Per-phase security contract: threat register, accepted risks, and audit trail. The evidence (file and line, pinning test) for every threat is in 19.7-SECURITY-REVIEW.md.


Trust Boundaries

Boundary Description Data Crossing
MCP client to /mcp any agent on the internet presents a bearer, a session id and JSON-RPC bodies OAuth access token or personal token, session id, tool arguments (high)
pier to plugin routes (in-process dispatch) pier calls a plugin's compiled route chain as the caller's pre-resolved principal dispatch marker with a principal, arguments as path, query and body (high)
frontend user to the link confirm and consent pages a signed-in browser confirms a link code or decides a consent session JWT, link code, consent decision (high)
administrator to My account and the Administrators screen admin actions that start, set or remove a link admin JWT, prompted email value (high)
verifier and resolvers to pier the OAuth server plugin and the user plugin answer who a bearer is and which admin a user is linked to grants, subjects, link answers (high)
instances to the shared session store Redis holds session records and carries subject events between instances binding keys, protocol state, events (medium)
nginx to the Go binary the public vhost opens the MCP paths only streamed MCP traffic (medium)
test results to the phase verdict the gate's output decides whether the phase is verified test output (medium)

Threat Register

Threat ID Category Component Severity Disposition Mitigation Status
T-19.7-01 Spoofing bouncer dispatch marker high mitigate 19.7-SECURITY-REVIEW.md: fixed in commit c49983d closed
T-19.7-02 Elevation of privilege cabana ResolveBackend and backend middleware with a marker high mitigate 19.7-SECURITY-REVIEW.md: fixed in commit c49983d closed
T-19.7-03 Elevation of privilege surf Handler lookup medium mitigate 19.7-SECURITY-REVIEW.md: corrected, fixed in 104db99 (was verified; A-WR-01, A-WR-02) closed
T-19.7-04 Tampering streaming route recovery medium mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-05 Denial of service mcp.enabled without the tag low mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-06 Elevation of privilege account contribution actions high mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-07 Tampering prompted record action value medium mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-08 Information disclosure account contribution rendering in the SPA low mitigate 19.7-SECURITY-REVIEW.md: corrected, fixed in 44835e4, 88559d5 (was verified; B-WR-03) closed
T-19.7-09 Elevation of privilege wristband MCP scope allow-list medium mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-10 Spoofing bearer verification high mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-11 Spoofing session hijack with a stolen Mcp-Session-Id high mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-12 Elevation of privilege token passthrough / confused deputy high mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-13 Elevation of privilege scope escalation to backend tools high mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-14 Information disclosure tool-list leakage across principals high mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-15 Elevation of privilege rehydration of a revoked session high mitigate 19.7-SECURITY-REVIEW.md: fixed in commit 1111828 closed
T-19.7-16 Spoofing audience confusion at /mcp medium mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-17 Tampering argument injection into routes medium mitigate 19.7-SECURITY-REVIEW.md: corrected, fixed in 104db99 (was a test pin only; A-WR-01, A-WR-02) closed
T-19.7-18 Denial of service sessions, streams and large results medium mitigate 19.7-SECURITY-REVIEW.md: corrected, fixed in 2bf9dca, c1c0c77 (was a test pin only; A-CR-01, A-WR-03) closed
T-19.7-19 Spoofing DNS rebinding / browser Origin medium mitigate 19.7-SECURITY-REVIEW.md: fixed in commit 0b8e027 (test pin; code unchanged) closed
T-19.7-20 Information disclosure audit log contents medium mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-21 Tampering prompt injection through tool metadata low accept 19.7-SECURITY-REVIEW.md: accepted (static plugin text, capped) closed
T-19.7-SC Tampering go get of go-sdk and jsonschema-go high mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-22 Elevation of privilege link without proof high mitigate 19.7-SECURITY-REVIEW.md: corrected, fixed in c14238b (F), 32f9259 (U) (was verified; C-CR-02, revert-checked) closed
T-19.7-23 Spoofing replayed or guessed link code medium mitigate 19.7-SECURITY-REVIEW.md: corrected, fixed in 32f9259 (U), 0125e29 (V) (was verified; C-WR-01) closed
T-19.7-24 Elevation of privilege admin sets a link high mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-25 Elevation of privilege cross-site confirm or unlink medium mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-26 Information disclosure stale link resolution medium mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-27 Elevation of privilege list and call disagree on frontend permissions medium mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-28 Spoofing personal token resolution at /mcp medium mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-29 Repudiation who linked whom low mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-30 Spoofing audience confusion at the verifier high mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-31 Elevation of privilege consent phishing for the backend scope high mitigate 19.7-SECURITY-REVIEW.md: corrected, fixed in 671513d (O), 970719c (U) (was verified; C-WR-02) closed
T-19.7-32 Elevation of privilege consent decided for another user's request medium mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-33 Elevation of privilege submitted scopes beyond the request medium mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-34 Spoofing superuser reach through an agent (D-22) high mitigate 19.7-SECURITY-REVIEW.md: accepted as designed with audit and ceiling (no switch) closed
T-19.7-35 Information disclosure revoked grant keeps a live session medium mitigate 19.7-SECURITY-REVIEW.md: corrected, fixed in 970719c (U), 671513d (O) (was fixed in 1111828; C-CR-01, revert-checked); missing self-service revoke accepted closed
T-19.7-36 Tampering partial update tools zeroing fields medium mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-37 Denial of service public /mcp and SSE through nginx medium mitigate 19.7-SECURITY-REVIEW.md: fixed in commit 0b8e027 (gate pin; config unchanged) closed
T-19.7-38 Spoofing open redirect from the consent page low mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-39 Repudiation a green gate that measured nothing high mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-40 Tampering the marker rule eroding over time medium mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-41 Information disclosure test fixtures leaking credentials low mitigate 19.7-SECURITY-REVIEW.md: verified closed
T-19.7-42 Denial of service abandoned stateful sessions high mitigate 19.7-SECURITY-REVIEW.md: fixed in 2bf9dca (revert-checked) closed
T-19.7-43 Denial of service concurrent initialize past max_per_binding medium mitigate 19.7-SECURITY-REVIEW.md: fixed in c1c0c77 closed
T-19.7-44 Tampering path values the mux never delivers high mitigate 19.7-SECURITY-REVIEW.md: fixed in 104db99 closed
T-19.7-45 Information disclosure raw provider or database errors in tool results medium mitigate 19.7-SECURITY-REVIEW.md: fixed in 104db99 closed
T-19.7-46 Spoofing personal-token sessions sharing pat:user:0 medium mitigate 19.7-SECURITY-REVIEW.md: fixed in 2404572 closed
T-19.7-47 Elevation of privilege stateless streams and stateless-only instances outliving a revocation medium mitigate 19.7-SECURITY-REVIEW.md: fixed in 2404572 closed
T-19.7-48 Denial of service router-wide locks across guard and database I/O medium mitigate 19.7-SECURITY-REVIEW.md: fixed in c1c0c77 closed
T-19.7-49 Elevation of privilege a provider naming the backend guard for a frontend tool low mitigate 19.7-SECURITY-REVIEW.md: fixed in 104db99 closed
T-19.7-50 Information disclosure a write-directing prompt for a read-only grant low mitigate 19.7-SECURITY-REVIEW.md: fixed in 211cec1 (F), b129902 (J) closed
T-19.7-51 Spoofing the fresh-sign-in proof (auth_time) high mitigate 19.7-SECURITY-REVIEW.md: fixed in c14238b (F), 32f9259 (U) (revert-checked) closed
T-19.7-52 Elevation of privilege member scopes crossing into the admin token catalog medium mitigate 19.7-SECURITY-REVIEW.md: fixed in 9eedfbb closed
T-19.7-53 Tampering javascript: or data: URL from an account action medium mitigate 19.7-SECURITY-REVIEW.md: fixed in 44835e4, 88559d5 closed
T-19.7-54 Denial of service one token revoke ending every MCP session low mitigate 19.7-SECURITY-REVIEW.md: fixed in 24cf6cd (F), 970719c (U), 671513d (O) closed
T-19.7-55 Repudiation failed g15_ attempts without a client address low mitigate 19.7-SECURITY-REVIEW.md: fixed in 24cf6cd closed
T-19.7-56 Information disclosure one plugin's error hiding every My account section low mitigate 19.7-SECURITY-REVIEW.md: fixed in 44835e4, 88559d5 closed
T-19.7-57 Elevation of privilege banned or password-reset users keeping MCP grants high mitigate 19.7-SECURITY-REVIEW.md: fixed in 970719c (U), 671513d (O) (revert-checked) closed
T-19.7-58 Spoofing the link code in access logs and browser history high mitigate 19.7-SECURITY-REVIEW.md: fixed in 32f9259 (U), 0125e29 (V) closed
T-19.7-59 Elevation of privilege a backend grant re-targeted to another administrator high mitigate 19.7-SECURITY-REVIEW.md: fixed in 671513d closed
T-19.7-60 Elevation of privilege member tokens with undeclared or shadowing scopes medium mitigate 19.7-SECURITY-REVIEW.md: fixed in ee5c096 closed
T-19.7-61 Tampering organisation logo uploads low mitigate 19.7-SECURITY-REVIEW.md: fixed in f20a8d3, 25b9f2e, 38551a4 closed
T-19.7-62 Denial of service nginx 2 MiB cap below pier's 4 MiB low mitigate 19.7-SECURITY-REVIEW.md: fixed in 3b569a1 closed
T-19.7-63 Repudiation stale last_used_ip of personal tokens at /mcp low mitigate 19.7-SECURITY-REVIEW.md: fixed in 970719c closed
T-19.7-64 Repudiation a green gate on a stray workspace or unreleased drift medium mitigate 19.7-SECURITY-REVIEW.md: fixed in 0aa48ae closed
T-19.7-65 Repudiation a control marked verified without a test that fails without it high mitigate 19.7-SECURITY-REVIEW.md: verified (revert-checks, Method step 6, Corrections) closed

Status: open · closed. Every high threat is verified or fixed; the accepted items are listed below with their reasons. Rows marked "corrected" had a verdict the phase code review disproved; the Corrections table of 19.7-SECURITY-REVIEW.md says what was wrong.


Accepted Risks Log

Risk ID Threat Ref Rationale Accepted By Date
AR-19.7-01 T-19.7-21 Tool and prompt descriptions are static plugin text, capped at 1024 runes at boot; dynamic text is a plugin bug. plan 19.7-05 security review 2026-10-23
AR-19.7-02 T-19.7-34 A linked superuser's agent reaches only the declared backend tools, behind an explicit backend consent with the admin's name, the read/write ceiling and a per-call audit line; a refusal switch would block the solo-owner case while a non-superuser link already gives the narrower alternative. Revisit when a plugin declares a superuser-only or destructive backend tool beyond content editing. plan 19.7-05 security review 2026-10-23
AR-19.7-03 T-19.7-35 MCP grants have no consent row, so the authorized-apps list does not revoke them yet; access still ends through client revocation, user deletion or deactivation, token expiry and the verifier's refusal of a revoked token. Follow-up in deferred-items.md. plan 19.7-05 security review 2026-10-23
AR-19.7-04 cross-cutting no-store The POST answer of My account's link action carries a one-shot, 10-minute link code without explicit no-store; POST responses are not stored by shared caches without explicit freshness. plan 19.7-05 security review 2026-10-23
AR-19.7-05 T-19.7-11, T-19.7-15 Stateful sessions use the SDK's 2025-03-26 stream defaults, and an initialized notification may land on another instance (deferred-items.md); multi-instance availability details that leave identity, binding and revocation checks unchanged. plan 19.7-05 security review 2026-10-23

Security Audit Trail

Audit Date Threats Total Closed Open Run By
2026-10-23 42 42 0 plan 19.7-05 executor (Task 4), gate bash scripts/check-phase19.7.sh --all green
2026-10-23 66 66 0 plan 19.7-09 executor (Task 4), gap closure: 8 verdicts corrected after the code review, T-19.7-42..T-19.7-65 added, the three critical fixes revert-checked, gate bash scripts/check-phase19.7.sh --all green

Sign-Off

  • All threats have a disposition (mitigate / accept / transfer)
  • Accepted risks documented in Accepted Risks Log
  • No open threat (frontmatter count confirmed)
  • status: verified set in frontmatter

Approval: verified 2026-10-23; re-verified after the gap closure (plans 06-09) 2026-10-23