Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @cedar-policy/cedar-wasm
  4. ›
  5. GHSA-c33x-vcv4-vg3g

GHSA-c33x-vcv4-vg3g: Cedar: JSON template is in scope missing slot-id validation allows link panic and decision divergence

October 29, 2026

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.

Users 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).

If 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.

When 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.

Concretely, consider the following JSON format policy template intended to deny users in a particular project from accessing documents with a particular classification.

{
"effect": "forbid",
"principal": {
"op": "is",
"entity_type": "User",
"in": { "slot": "?resource" }
},
"action": { "op": "All" },
"resource": {
"op": "is",
"entity_type": "Doc",
"in": { "slot": "?principal" }
},
"conditions": []
}

Linked with ?principal = Classification::"topsecret" and ?resource = Project::"alpha", the author expects to create the policy:

forbid(principal is User in Project::"alpha", action, resource is Doc in Classification::"topsecret");

But because Cedar internally links slots by scope position (not by name), the actual policy evaluated by the engine is:

forbid(principal is User in Classification::"topsecret", action, resource is Doc in Project::"alpha");

If a user is in Project::"alpha" but not Classification::"topsecret", the forbid policy does not apply, and access is unintentionally allowed.

References

  • github.com/advisories/GHSA-c33x-vcv4-vg3g
  • github.com/cedar-policy/cedar/security/advisories/GHSA-c33x-vcv4-vg3g

Code Behaviors & Features

Detect and mitigate GHSA-c33x-vcv4-vg3g with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 3.2.0 before 3.4.3, all versions starting from 4.0.1 before 4.11.1

Fixed versions

  • 3.4.3
  • 4.11.1

Solution

Upgrade to versions 3.4.3, 4.11.1 or above.

Impact 6.6 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:L

Learn more about CVSS

Weakness

  • CWE-20: Improper Input Validation

Source file

npm/@cedar-policy/cedar-wasm/GHSA-c33x-vcv4-vg3g.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:05 +0000.