/

CVE-2026-55771

Severity:

HIGH RISK

(8.8)

Logic Error in Entity Equality (CWE-697) in CedarJava

CVE-2026-55771

Deferred

Vulnerability type

Category:

Logic Error / Incorrect Comparison

CWE:

CWE-94, CWE-697, CWE-843

Impact:

Authorization Logic Bypass / Incorrect Access Decisions

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

CedarJava contains a logic error in the EntityIdentifier.equals() method where null and self-reference checks are inverted, causing incorrect equality results.

While core Cedar authorization decisions are not directly affected, integrators relying on Java-side equality checks for entity identifiers could make flawed access-control or data-handling decisions under certain conditions.

Affected context

This vulnerability appears in CedarJava deployments where the Java EntityIdentifier.equals() method is used to compare entity identifiers, especially in custom authorization or identity-mapping logic.

It becomes relevant when integrators build additional checks, caches, or routing decisions on top of CedarJava's identifier equality semantics.

The issue does not alter Cedar's core Rust-based authorization computation from JSON, but any Java-side equality assumptions can be subtly broken if nulls or self-comparisons are involved.

Exploit preconditions

  • Attack surface: Application code paths that depend on EntityIdentifier.equals() for security-relevant decisions (access checks, caching, identity mapping).
  • Required access: Ability to influence entity identifiers or inputs passed into equality checks, typically via API requests or integration layers.
  • Trigger point: Invocation of EntityIdentifier.equals() where one or both operands may be null, or where self-comparison is expected to return true.
  • Why exploitation is possible: The method's null/self branches are inverted, returning true for null comparisons and false for identical self-comparisons, which can mislead higher-level logic that trusts equality semantics.

Why this happens

The underlying bug is an incorrect implementation of a comparison routine, mapping to CWE-697 (Incorrect Comparison).

In the EntityIdentifier.equals() method, the control-flow for null and self-reference checks is inverted, violating the expected contract that x.equals(x) is true and x.equals(null) is false.

This flawed logic can undermine application-layer authorization or data consistency checks built around equality, even though the Cedar core engine remains correct.

The issue illustrates how subtle comparison errors at the library level can propagate into access-control decisions when integrators compose additional logic around identity equality.

Potential impact

  • Authorization checks may incorrectly allow or deny access when relying on EntityIdentifier.equals().
  • Caching layers or maps keyed by entity identifiers could behave inconsistently, leading to stale or incorrect policy evaluation results.
  • Audit logging and correlation of actions to entities may misattribute events or fail to record relevant activity.
  • Multi-tenant or role-based routing based on identifier equality could misroute requests or leak information between logical domains.

General mitigation guidance

Mitigation typically involves validating and hardening equality semantics around security-sensitive identifiers and avoiding reliance on subtly broken comparison methods.

Common defensive patterns include:

  • Treating equality routines for identities as part of the security boundary and subject to rigorous tests and invariants (e.g., reflexivity, symmetry, null-handling).
  • Centralizing entity identifier comparison logic behind well-reviewed abstractions rather than ad hoc calls scattered in application code.
  • Building authorization logic to depend directly on canonical, validated identifiers and clear policy evaluations, instead of implicit equality shortcuts.
  • Incorporating defensive checks and assertions in authorization-related code paths to detect unexpected equality behavior early in development.

How teams detect issues like this

Organizations can detect similar comparison logic risks through:

  • Static analysis or linting rules focused on equals()/hashCode() implementations, particularly around null and self-reference handling.
  • Code review practices that scrutinize identity and authorization-related helper methods, confirming they obey standard equality contracts.
  • Unit and property-based tests that exercise equality functions under varied inputs (nulls, same-instance, equivalent instances, different instances).
  • Policy enforcement in CI/CD to flag changes to core comparison routines for additional security review or automated verification.

Sources

SourceLink
github.comgithub.com/cedar-policy/cedar-java/security/advisories/GHSA-4r9r-4425-74p7

Frequently asked

questions

No. The Cedar authorization decisions are computed in Rust from JSON and are not directly impacted. The risk arises when integrators rely on the Java EntityIdentifier.equals() for their own security or identity logic.

An attacker must be able to influence the entity identifiers or inputs that feed into equality-based decisions in the application. This typically occurs through application APIs, integration points, or multi-tenant routing logic.

Ensure that equality methods for security-relevant identifiers strictly follow standard contracts (reflexivity, symmetry, and correct null handling) and are covered by tests. Treat changes to these methods as security-sensitive and subject to elevated review.

Adopt systematic testing for identity and comparison utilities, use code review checklists focused on equals()/hashCode(), and rely on well-tested framework or language primitives wherever possible instead of custom comparison logic in authorization code paths.

Find out what's already
exploitable in your codebase.