/

CVE-2026-23836

Severity:

CRITICAL RISK

(9.9)

Improper Input Validation in HotCRP Formula Engine

CVE-2026-23836

Analyzed

Vulnerability type

Category:

Improper Input Validation

CWE:

CWE-20

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.9)

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

HotCRP's formula engine introduced in version 3.1 generated PHP code from user-defined formulas without adequate sanitization or validation, allowing crafted input to influence the generated code.

Under certain conditions, users could cause this generated code to execute arbitrary PHP, potentially leading to full compromise of the application environment.

Affected context

The vulnerability occurs in HotCRP's formula feature, where user-provided formula expressions are parsed and transformed into PHP code for evaluation.

It affects deployments that:

  • Allow users to define or edit formulas (e.g., for scoring, search, or views),
  • Dynamically generate and execute PHP code based on those formulas,
  • Do not apply strict validation and escaping on formula tokens before code generation.

In such setups, the formula engine becomes part of the trusted execution path, even though it is fed by potentially untrusted input.

Exploit preconditions

  • Attack surface: Web interface where users can input or configure formulas (e.g., search formulas, score formulas, or custom computed fields).
  • Required access: Ability to create or modify formulas; this might be available to authenticated users such as reviewers, chairs, or administrators depending on configuration.
  • Trigger point: Evaluation of a formula that has been converted into PHP code by the application (e.g., when a search is run, a report is generated, or a page using the formula is viewed).
  • Why exploitation is possible: The formula compiler performs inadequate validation and sanitization, allowing user-controlled fragments to be injected into generated PHP code, which is then executed by the server.

Why this happens

This issue stems from improper input validation in a dynamic code-generation pathway.

The formula system takes structured user input, parses it, and emits executable PHP code without fully constraining or sanitizing all user-controlled elements.

As a result, user-supplied formula syntax can escape intended expression boundaries and become part of the PHP runtime logic, aligning with CWE-20: Improper Input Validation.

Conceptually, the bug is that the application treats user formulas as semi-trusted "specifications" and fails to strictly enforce a limited, safe grammar before turning them into server-side code.

Potential impact

  • Execution of arbitrary PHP code with the privileges of the web server process.
  • Reading, modifying, or deleting conference data, including submissions, reviews, and user information.
  • Stealing session data or escalating privileges within the HotCRP instance.
  • Installing backdoors or pivoting to other systems accessible from the application server.
  • Disrupting conference operations through data corruption or service interruption.

General mitigation guidance

Long-term mitigation generally focuses on eliminating or strongly constraining dynamic code generation:

  • Replace direct PHP code generation with safe evaluation mechanisms (e.g., an interpreted expression engine that never emits raw PHP).
  • Enforce a strict, well-defined grammar for formulas and validate all input against it before use.
  • Treat all formula content as untrusted data and avoid concatenating it into executable code paths.
  • Constrain the execution environment so that even if expression handling fails, the process runs with minimal privileges and limited file and network access.
  • Apply defense-in-depth by limiting who can define or edit formulas and by logging and reviewing changes to powerful configuration features.

How teams detect issues like this

Detection typically involves a combination of code analysis and operational monitoring:

  • Static analysis: Search for patterns where user-provided formula strings or similar fields are transformed into PHP code, especially via eval, create_function, dynamic include, or similar constructs.
  • Code review: Examine the formula parsing and compilation components for direct string interpolation into code, insufficient tokenization, or reliance on ad-hoc escaping instead of a formal parser.
  • Policy enforcement: Establish guidelines that forbid new features from emitting dynamic PHP from user input and gate such changes through security review.
  • Runtime monitoring: Enable detailed logging when formulas are created, modified, or evaluated; correlate unusual patterns (e.g., unexpected operators or function-like constructs) with security alerts.
  • Automated SAST or custom linting rules can help flag risky use of user-controlled data in code generation paths before deployment.

Sources

SourceLink
github.comgithub.com/kohler/hotcrp/commit/4674fcfbb76511072a1145dad620756fc1d4b4e9
github.comgithub.com/kohler/hotcrp/commit/bfc7e0db15df6ed6d544a639020d2ce05a5f0834
github.comgithub.com/kohler/hotcrp/security/advisories/GHSA-hpqh-j6qx-x57h

Frequently asked

questions

Yes. If a user can reach the formula functionality through the web interface and supply crafted formulas, they may be able to trigger arbitrary PHP execution when those formulas are evaluated.

The attacker generally needs an account that can create or modify formulas. In many deployments, this may include roles such as reviewers, track chairs, or administrators, depending on how the feature is configured and exposed.

The safest approach is to remove direct dynamic PHP generation from user-controlled input and instead evaluate formulas using a dedicated, sandboxed expression engine that enforces a strict grammar and treats all input purely as data.

Avoid building features that turn user input into executable code, enforce rigorous input validation for any domain-specific language, mandate security review for any dynamic evaluation mechanisms, and use automated checks to block new instances of dynamic code execution based on user-controlled data.

Find out what's already
exploitable in your codebase.