Title: Verifier does not reject malformed structured-field input at step 1 (wrong error code; covered-component smuggling) · Issue #976 · adcontextprotocol/adcp-client-python · GitHub
Open Graph Title: Verifier does not reject malformed structured-field input at step 1 (wrong error code; covered-component smuggling) · Issue #976 · adcontextprotocol/adcp-client-python
X Title: Verifier does not reject malformed structured-field input at step 1 (wrong error code; covered-component smuggling) · Issue #976 · adcontextprotocol/adcp-client-python
Description: Found while vendoring the complete AdCP 3.1.1 request-signing vector set (#975). Reproductions are the newly vendored vectors, currently strict-xfail in tests/conformance/signing/test_verifier_vectors.py. Problem verify_request_signature...
Open Graph Description: Found while vendoring the complete AdCP 3.1.1 request-signing vector set (#975). Reproductions are the newly vendored vectors, currently strict-xfail in tests/conformance/signing/test_verifier_vect...
X Description: Found while vendoring the complete AdCP 3.1.1 request-signing vector set (#975). Reproductions are the newly vendored vectors, currently strict-xfail in tests/conformance/signing/test_verifier_vect...
Opengraph URL: https://github.com/adcontextprotocol/adcp-client-python/issues/976
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Verifier does not reject malformed structured-field input at step 1 (wrong error code; covered-component smuggling)","articleBody":"Found while vendoring the complete AdCP 3.1.1 request-signing vector set (#975). Reproductions are the newly vendored vectors, currently strict-xfail in `tests/conformance/signing/test_verifier_vectors.py`.\n\n## Problem\n\n`verify_request_signature` has no step-1 strict-parse stage. Structured-field input that is malformed or ambiguous is not rejected at parse time; it flows on to a later checklist step and is rejected under a **different** error code — or, worse, is silently resolved to one interpretation.\n\nConformance requires byte-for-byte match on `expected_outcome.error_code`, so rejecting with the wrong code is a graded failure, not a near-miss. More importantly, each of these is a parser-differential surface: signer and verifier can disagree on what was actually signed.\n\n## Failing vectors\n\n| vector | expected | actual | step reached |\n|---|---|---|---|\n| `negative/021-duplicate-signature-input-label.json` | `request_signature_header_malformed` | `request_signature_components_incomplete` | 6 |\n| `negative/022-multi-valued-content-type.json` | `request_signature_header_malformed` | `request_signature_invalid` | 10 |\n| `negative/023-multi-valued-content-digest.json` | `request_signature_header_malformed` | `request_signature_invalid` | 10 |\n\n### 021 — duplicate `Signature-Input` dictionary key\n\n`Signature-Input` declares label `sig1` twice. RFC 8941 §3.2 permits an implementation to reject *or* retain the last value; the AdCP profile requires rejection at step 1 as downgrade protection.\n\nThis is the one with teeth. The SDK silently resolves the duplicate and then rejects for an unrelated reason — `request_signature_components_incomplete: required covered component missing: @authority` — which means it took the *second* `sig1`, the one covering fewer components. That is precisely the smuggling scenario the spec's rejection rule exists to prevent: a proxy appends a weaker `sig1` and a verifier that reads the last value grades a different component set than the signer committed to. The vector's own `$comment` calls this out.\n\n### 022 — multi-valued `Content-Type`\n\n`Content-Type: application/json, text/plain` on a field covered by the signature. `Content-Type` is not a List-Structured-Field, so concatenation leaves the covered value undefined relative to the signature base. The SDK derives a base from the raw value and fails at crypto verify instead of rejecting at parse.\n\n### 023 — multi-valued `Content-Digest`\n\nTwo `sha-256` members in one `Content-Digest`. Per RFC 9530 §2 this is a Dictionary field and duplicate algorithms are ambiguous for signature coverage. Same failure mode as 022.\n\n## Suggested direction\n\nA strict-parse stage ahead of the checklist that rejects with `request_signature_header_malformed` on: duplicate keys in the `Signature-Input` / `Signature` dictionaries, and multiple field values (or duplicate structured-field members) for any covered non-list field.\n\nNote this changes the error code returned for inputs that are currently rejected as `request_signature_invalid` / `request_signature_components_incomplete`, which is a visible behavior change for consumers keying on the code.\n","author":{"url":"https://github.com/KonstantinMirin","@type":"Person","name":"KonstantinMirin"},"datePublished":"2026-07-28T20:32:59Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/976"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:35586f47-a4fe-9ab9-d458-40518d0c750a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8E54:2564F:E41112:12D9718:6B00FEBC |
| html-safe-nonce | 9b3dd888b88a1fa8d9dff709d216c0b0eb82de09de9b023f7313616131a9db8d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTU0OjI1NjRGOkU0MTExMjoxMkQ5NzE4OjZCMDBGRUJDIiwidmlzaXRvcl9pZCI6IjMxODQ0MTc2MTI2NTg0NDE5MTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8a282782194d296dd827cabae79d42df37232de8f30037f29fb461f822d26d48 |
| hovercard-subject-tag | issue:5002747623 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/adcontextprotocol/adcp-client-python/976/issue_layout |
| twitter:image | https://opengraph.githubassets.com/00cab0bd67e349fbe23bd57c8ac265dd8c9cb47aa8df67b5609c86fca82c8de0/adcontextprotocol/adcp-client-python/issues/976 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/00cab0bd67e349fbe23bd57c8ac265dd8c9cb47aa8df67b5609c86fca82c8de0/adcontextprotocol/adcp-client-python/issues/976 |
| og:image:alt | Found while vendoring the complete AdCP 3.1.1 request-signing vector set (#975). Reproductions are the newly vendored vectors, currently strict-xfail in tests/conformance/signing/test_verifier_vect... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | KonstantinMirin |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| go-import | github.com/adcontextprotocol/adcp-client-python git https://github.com/adcontextprotocol/adcp-client-python.git |
| octolytics-dimension-user_id | 221690821 |
| octolytics-dimension-user_login | adcontextprotocol |
| octolytics-dimension-repository_id | 1090305973 |
| octolytics-dimension-repository_nwo | adcontextprotocol/adcp-client-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1090305973 |
| octolytics-dimension-repository_network_root_nwo | adcontextprotocol/adcp-client-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width