/

CVE-2026-54569

Severity:

CRITICAL RISK

(9.8)

Code Injection (CWE-95) in SENAITE.CORE JSON API Endpoint

CVE-2026-54569

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-95, CWE-862

Impact:

Unauthenticated Remote Code Execution

Severity:

CRITICAL RISK

(9.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

SENAITE.CORE contains a critical chain of missing authorization and unsafe evaluation in its JSON API. An unauthenticated attacker may resolve selected objects and cause attacker-controlled values to be evaluated as Python code, potentially enabling remote code execution in the Zope worker.

Affected context

The vulnerability affects SENAITE.CORE deployments using the JSON API state-changing routes, including object update, removal, action, and user-related operations. Risk exists when these routes resolve attacker-selected objects without first enforcing the relevant API permission and when request values for record-related fields reach eval()-based processing before field-level write authorization. The unsafe evaluation pattern is also present in record and records field handling.

Exploit preconditions

  • Attack surface: SENAITE.CORE JSON API and related field-processing code
  • Required access: No authentication may be required when the affected API routes are exposed
  • Trigger point: Processing a state-changing request that supplies a value for a record-related field
  • Authorization condition: The route must resolve objects before enforcing the senaite.core: Access JSON API permission
  • Why exploitation is possible: Raw request data can reach Python evaluation before field mutator write-permission checks, allowing code execution in the application worker

Why this happens

The primary flaw is the evaluation of attacker-influenced request data as Python expressions, which maps to CWE-95: Improper Neutralization of Directives in Dynamically-Evaluated Code. Treating serialized field values as executable expressions creates a code-injection boundary rather than a data-parsing boundary.

The issue is compounded by CWE-862: Missing Authorization, because affected routes can resolve selected objects without consistently checking the required API permission first. Authorization performed later in the request lifecycle cannot reliably protect earlier object resolution or evaluation behavior.

Potential impact

  • An attacker may execute arbitrary Python code in the Zope worker
  • Laboratory data, files, or account information could be exposed
  • Application-managed records and configuration could be modified
  • Laboratory operations could be disrupted or rendered unavailable
  • Compromised application privileges could enable further access to connected services

General mitigation guidance

Mitigation generally focuses on removing dynamic evaluation from request processing and enforcing authorization before any attacker-influenced object resolution or mutation.

Common defensive patterns include:

  • Replacing eval() with typed parsers, explicit value maps, or schema-constrained deserialization
  • Treating all request values as data and rejecting expressions or executable constructs
  • Enforcing API authorization at the route boundary before resolving objects
  • Repeating object-level write checks before each state-changing operation
  • Applying least-privilege permissions to the application worker and connected services
  • Separating validation, authorization, and mutation into clearly ordered stages
  • Restricting anonymous access to administrative and state-changing API surfaces

How teams detect issues like this

Organizations can look for this vulnerability class through:

  • Static analysis rules identifying eval() or equivalent dynamic evaluation on request-derived values
  • Code searches for request data passed into expression engines, template evaluators, or generic object constructors
  • Review of API routes that resolve object identifiers before authentication or permission checks
  • Tests verifying that anonymous requests cannot reach state-changing handlers or object-resolution paths
  • Policy enforcement requiring authorization checks at route boundaries and before mutation
  • Runtime monitoring for unexpected interpreter activity, abnormal worker behavior, or unauthorized API access

Automated security review tools may help identify dynamic evaluation and missing authorization patterns, but findings should be validated against the framework's permission and request-processing flow.

Sources

SourceLink
github.comgithub.com/senaite/senaite.core/commit/a24d65e99a17ac43c5374ed9f0a60d0fe60d2f74
github.comgithub.com/senaite/senaite.core/commit/ef4b6d73575b0fbc0edc6114e5e025089aaf9eb7
github.comgithub.com/senaite/senaite.core/pull/2903
github.comgithub.com/senaite/senaite.core/pull/2919
github.comgithub.com/senaite/senaite.core/security/advisories/GHSA-jrw6-7x4q-w25j

Frequently asked

questions

Yes. When the affected JSON API is externally reachable and anonymous access is permitted, exploitation may occur remotely through the API request flow.

Not necessarily. The described authorization gap allows an unauthenticated attacker to reach relevant processing paths when the vulnerable routes are exposed.

Remove dynamic evaluation of request-controlled values, replace it with strict typed parsing, and enforce authorization before object resolution and mutation.

Treat request data strictly as untrusted data, prohibit dynamic code evaluation, apply route-level and object-level authorization, and test anonymous access to every state-changing endpoint.

Find out what's already
exploitable in your codebase.