/

CVE-2026-43633

Severity:

CRITICAL RISK

(10.0)

Unsafe Deserialization in HestiaCP Web Terminal

CVE-2026-43633

Deferred

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Unauthenticated Remote Code Execution as Root

Severity:

CRITICAL RISK

(10.0)

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

A session deserialization flaw in the HestiaCP web terminal allows crafted HTTP headers to be interpreted as trusted session data across PHP and Node.js boundaries.

On systems with the web terminal feature enabled, unauthenticated remote attackers can abuse this mismatch to execute arbitrary commands with root privileges.

Affected context

The vulnerability arises in HestiaCP deployments that:

  • Run versions 1.9.0 through 1.9.4
  • Have the web terminal feature enabled and accessible over HTTP/HTTPS
  • Share session data between PHP and a Node.js-based web terminal component
  • Rely on PHP to parse and store session data that Node.js later reads and trusts

In this context, HTTP headers are processed into PHP sessions, but the Node.js component deserializes these sessions using a format and trust model that diverges from PHP's, creating an exploitable boundary.

Exploit preconditions

  • Attack surface: Public HestiaCP web interface where the web terminal endpoint is reachable.
  • Required access: No prior authentication required; the attacker only needs the ability to send crafted HTTP requests to the HestiaCP instance.
  • Trigger point: Handling of HTTP requests that cause PHP to write or update session data, which is then consumed by the Node.js web terminal component.
  • Why exploitation is possible:
  • PHP and Node.js use different expectations for session data format and semantics.
  • Data derived from HTTP headers is written into the session by PHP and later parsed by Node.js as if it were trusted, structured state.
  • The Node.js web terminal logic treats certain deserialized values as command or configuration input without robust validation or isolation, enabling code execution.

Why this happens

The core issue is an unsafe deserialization pattern across heterogeneous components (PHP and Node.js) that share a session store but do not enforce a consistent, validated format.

PHP's session handler ingests data derived from HTTP headers and persists it in a serialized form meant for PHP's internal consumption. The Node.js web terminal component, however, reads and interprets this session data using its own parsing and trust model, assuming that values are well-formed and trustworthy. Because the data originates from attacker-controlled HTTP headers and is not strongly validated or constrained at the boundary, the Node.js component ends up deserializing untrusted data into privileged runtime state.

This maps to CWE-502: Unsafe Deserialization, where untrusted serialized data is accepted and processed in a way that influences control flow and command execution. The cross-language session format mismatch exacerbates the issue, as each side implicitly trusts the other's encoding without schema enforcement, allowing crafted payloads to reach high-privilege code paths.

Potential impact

  • Remote attackers can execute arbitrary commands with root privileges on the HestiaCP host.
  • Complete compromise of the control panel environment and managed services.
  • Installation of persistent backdoors or further malware on the server.
  • Exposure or tampering of hosted data, configurations, and credentials.
  • Use of the compromised server as a pivot point for lateral movement within the infrastructure.

General mitigation guidance

Effective mitigation typically focuses on eliminating unsafe deserialization and tightening trust boundaries for shared session data:

  • Enforce a strict, language-agnostic session format (e.g., JSON with explicit schemas) for all components that share session state, rejecting any values that fail schema validation.
  • Treat session contents as untrusted input in each consuming component; apply robust validation, whitelisting, and type checks before using any session-derived value to influence commands, configuration, or identifiers.
  • Avoid deserializing complex or executable types from sessions; instead, store only primitive or well-bounded data and reconstruct complex objects server-side from trusted sources.
  • Isolate high-privilege functionality such as web terminals, reducing the privileges of the process and applying OS-level sandboxing so that misuse of session data cannot directly yield root-level code execution.
  • Reduce reliance on HTTP headers for sensitive or structural state and ensure those headers undergo centralized validation and normalization before being persisted.

How teams detect issues like this

Detection can focus on both code-level patterns and runtime signals:

  • Static analysis and code review:
  • Flag code paths where session data is parsed or deserialized in multiple languages or runtimes without shared schemas.
  • Identify any use of generic deserialization or loose parsing logic that turns session values directly into commands, configuration, or identifiers.
  • Look for trust assumptions in Node.js or PHP components that treat session fields as inherently safe, especially when they influence shell execution or privileged operations.
  • Policy and configuration checks:
  • Enforce architectural rules that prohibit sharing of unconstrained serialized state between components, particularly across language boundaries.
  • Require explicit schema definitions for shared data and automated validation as part of CI/CD pipelines.
  • Runtime monitoring:
  • Monitor command execution patterns from the web terminal process for anomalous commands or unusual arguments.
  • Log and inspect session values and correlated HTTP headers when access to the web terminal is initiated, focusing on unexpected or malformed structures.

Automated security review tools, including SAST and configuration analyzers, can be configured to highlight cross-language session handling and unsafe deserialization patterns during development and deployment reviews.

Sources

SourceLink
github.comgithub.com/hestiacp/hestiacp/commit/854d71b3c1737b0a0d0cc55c926008ffe1f6719b
github.comgithub.com/hestiacp/hestiacp/issues/5229
github.comgithub.com/hestiacp/hestiacp/pull/5244
mercuryiss.com.aumercuryiss.com.au/hestiacp-unauthenticated-rce-ip-spoofing-cve-2026-43633-cve-2026-43634
vulncheck.comvulncheck.com/advisories/hestiacp-deserialization-rce-via-web-terminal

Frequently asked

questions

Yes. If the HestiaCP web interface (with the web terminal enabled) is accessible over the network, an unauthenticated remote attacker can exploit the vulnerability by sending crafted HTTP requests.

No prior authentication is required. The vulnerability stems from how new or existing sessions are populated from HTTP headers and later misinterpreted by the Node.js web terminal component, so control of the request alone can be sufficient.

The safest pattern is to avoid directly deserializing shared session or state objects from untrusted sources across components. Instead, define a strict, shared schema for session data, validate all fields on both write and read paths, and ensure that privileged operations never rely on deserialized values that originate from client-controlled input.

Future designs should minimize cross-language sharing of loosely structured serialized data, especially between components with different trust assumptions. Adopt secure-by-default serialization formats, enforce schema validation, treat all session contents as untrusted until validated, and keep privileged functionality isolated with least-privilege execution and strong input validation at every boundary.

Find out what's already
exploitable in your codebase.