{"id":"GHSA-c33x-vcv4-vg3g","revision":null,"records":[{"revision":"3bc15c8dae47414ea3233b9bb5de5f19","observedAt":"2026-10-29T17:12:42.182+00:00","statement":{"source":"osv","id":"GHSA-c33x-vcv4-vg3g","aliases":[],"title":"Cedar: JSON template is in scope missing slot-id validation allows link panic and decision divergence","description":"Cedar users must be using all of the following features to be affected by this advisory: JSON format policies, policy templates, and the `is in` scope condition. This advisory only affects JSON-formatted Cedar policy templates containing `is in` scope conditions that are **malformed** according to the Cedar syntax. It does **not** affect syntactically well-formed policies.\n\nUsers of Cedar who author policies in the JSON format were able to write Cedar policies using the `is in` condition with an incorrect slot identifier in the principal and resource scope constraints (e.g., `?principal` in the resource scope constraint) even though this is not allowed when parsing policies from the Cedar policy syntax. Internally, the slot identifiers were silently corrected (e.g. `?resource` is placed in the resource scope constraint). \n\nIf the policy contains *exactly one slot* in either the principal or resource position, then any attempt to create a linked policy from the template results in an error: the internal representation of the template does not contain the slot identifier as written in the malformed JSON policy (it has been corrected silently), so attempting to fill that slot is an error. If instead the template is linked using slot identifier expected internally (i.e., not what is written in the JSON template), the linking will initially succeed, but a subsequent invariant violation will cause a panic.\n\nWhen the template contains *slots in both the principal and resource* position, then both slots will be present in the internal representation: linking succeeds, but with each slot bound to the value intended for the other (the silent correction). The linked policy is then semantically different from the malformed policy the user intended, and any subsequent authorization decision made against that policy may lead to accesses being unintentionally allowed or denied.\n\nConcretely, consider the following JSON format policy template intended to deny users in a particular project from accessing documents with a particular classification.\n```\n{\n  \"effect\": \"forbid\",\n  \"principal\": {\n    \"op\": \"is\",\n    \"entity_type\": \"User\",\n    \"in\": { \"slot\": \"?resource\" }\n  },\n  \"action\": { \"op\": \"All\" },\n  \"resource\": {\n    \"op\": \"is\",\n    \"entity_type\": \"Doc\",\n    \"in\": { \"slot\": \"?principal\" }\n  },\n  \"conditions\": []\n}\n```\n\nLinked with `?principal = Classification::\"topsecret\"` and `?resource = Project::\"alpha\"`, the author expects to create the policy:\n```\nforbid(principal is User in Project::\"alpha\", action, resource is Doc in Classification::\"topsecret\");\n```\n\nBut because Cedar internally links slots by scope position (not by name), the actual policy evaluated by the engine is:\n```\nforbid(principal is User in Classification::\"topsecret\", action, resource is Doc in Project::\"alpha\");\n```\n\nIf a user is in `Project::\"alpha\"` but not `Classification::\"topsecret\"`, the `forbid` policy does not apply, and access is unintentionally allowed.\n\n## Patches\n\nThis advisory is patched in version 4.11.1 and 3.4.3, both available on Crates.io and NPM.\n\n## Workarounds\n\nIf you cannot update to a patched version, you can determine if you are affected by checking your JSON format policy templates for the following two patterns.\n\n```\n  \"principal\": {\n    \"op\": \"is\",\n    \"entity_type\": \"User\",\n    \"in\": { \"slot\": \"?resource\" }\n  }\n```\n\nand\n```\n  \"resource\": {\n    \"op\": \"is\",\n    \"entity_type\": \"Doc\",\n    \"in\": { \"slot\": \"?principal\" }\n  }\n```\n\n## References\n* [Cedar Policy Language Reference Guide - Cedar Policy Templates](https://docs.cedarpolicy.com/policies/templates.html)\n* [Cedar Policy Language Reference Guide - JSON Policy Format](https://docs.cedarpolicy.com/policies/json-format.html)","state":0,"publishedAt":"2026-10-29T16:35:04+00:00","modifiedAt":"2026-10-29T16:45:05.2143153+00:00","affected":[{"ecosystem":"crates.io","name":"cedar-policy","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"4.0.0"},{"kind":"fixed","version":"4.11.1"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"crates.io","name":"cedar-policy","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"3.0.0"},{"kind":"fixed","version":"3.4.3"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@cedar-policy/cedar-wasm","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"4.0.1"},{"kind":"fixed","version":"4.11.1"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@cedar-policy/cedar-wasm","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"3.2.0"},{"kind":"fixed","version":"3.4.3"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:N/VI:N/VA:L/SC:L/SI:L/SA:L","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"LOW"}],"references":["https://github.com/cedar-policy/cedar/security/advisories/GHSA-c33x-vcv4-vg3g","https://github.com/cedar-policy/cedar"],"sourceUrl":"https://github.com/advisories/GHSA-c33x-vcv4-vg3g","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-c33x-vcv4-vg3g","identifiers":["GHSA-c33x-vcv4-vg3g"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-07T06:27:05.6380447+00:00","complete":true,"records":1769,"lastAttemptAt":"2026-11-07T06:27:05.6380447+00:00","lastSuccessAt":"2026-11-07T06:27:05.7932457+00:00","error":null,"lastVerifiedAt":"2026-11-07T06:27:05.7932469+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-bb5c9d5a08063ef076042e33dd72a7d0ffa4c4487efdcf3106e29ba55ec2ad57-6f544c2f3953f500ddb5b39526af1c06f4dafd806ddc7bf6476fb6444529ee07","complete":true,"records":420723,"lastAttemptAt":"2026-11-07T06:27:04.4118644+00:00","lastSuccessAt":"2026-11-07T06:27:04.3307229+00:00","error":null,"lastVerifiedAt":"2026-11-07T06:27:04.4118644+00:00","snapshotPublishedAt":"2026-11-07T05:27:23+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-f3bff9471edc48448e31845a67a4407b","complete":true,"records":13630,"lastAttemptAt":"2026-11-07T06:38:40.0754161+00:00","lastSuccessAt":"2026-11-07T06:38:40.073+00:00","error":null,"lastVerifiedAt":"2026-11-07T06:38:40.073+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13685,"expectedIdentifiers":13685,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-07T06:27:05.6380447+00:00","complete":true,"records":1096,"lastAttemptAt":"2026-11-07T06:27:05.6380447+00:00","lastSuccessAt":"2026-11-07T06:27:05.7940505+00:00","error":null,"lastVerifiedAt":"2026-11-07T06:27:05.7940508+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-1262a9fa83024e28a1560dfc0c9cdf3c","complete":true,"records":13645,"lastAttemptAt":"2026-11-07T06:27:08.5367847+00:00","lastSuccessAt":"2026-11-07T06:27:08.533+00:00","error":null,"lastVerifiedAt":"2026-11-07T06:27:08.533+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13685,"expectedIdentifiers":13685,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-0eb4d6dde62dffacd040ad992d4fd5a65cd7d0dc5f5f4cfa8b41967fc6f9ca5f","complete":true,"records":9914,"lastAttemptAt":"2026-11-07T06:27:05.1996809+00:00","lastSuccessAt":"2026-11-06T20:10:36.6450506+00:00","error":null,"lastVerifiedAt":"2026-11-07T06:27:05.1996809+00:00","snapshotPublishedAt":"2026-11-06T20:02:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-fde804134ecdda0ddd5ff5c26ee1fff5a6fa659311f7ef2e51c6ad54964db0e2","complete":true,"records":1971,"lastAttemptAt":"2026-11-07T06:27:04.6304807+00:00","lastSuccessAt":"2026-11-06T19:03:17.0399903+00:00","error":null,"lastVerifiedAt":"2026-11-07T06:27:04.6304807+00:00","snapshotPublishedAt":"2026-11-06T18:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-335633e78a15c9cde10a6025895b5617717087fb945489ae7e15d377bacf34a9","complete":true,"records":3055,"lastAttemptAt":"2026-11-07T06:27:05.5809672+00:00","lastSuccessAt":"2026-11-06T16:03:00.7615789+00:00","error":null,"lastVerifiedAt":"2026-11-07T06:27:05.5809672+00:00","snapshotPublishedAt":"2026-11-06T16:02:48+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-a0b728bc1c5526b5429930c00621636eba8655069c176697c3080f8377619ad7","complete":true,"records":231291,"lastAttemptAt":"2026-11-07T06:27:05.0945652+00:00","lastSuccessAt":"2026-11-07T00:28:51.1983528+00:00","error":null,"lastVerifiedAt":"2026-11-07T06:27:05.0945652+00:00","snapshotPublishedAt":"2026-11-06T23:33:08+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}