Public research

Apache HTTP Server mod_ssl

CVE-2026-59797
SSLRequire file-expression restriction bypass

Low (Apache) · Public source snapshot: November 12, 2026

Original portfolio report · Source reference · Source reference · Source reference · Source reference · Upstream commit · Upstream commit · Upstream commit · Source reference

Shared credits and the scope of my investigation are documented below.

Apache HTTP Server / mod_ssl · Low (Apache) · Fixed in 2.4.69

Public security research by Charles Vosburgh (the-vibe-dev), one of Apache's publicly acknowledged finders. Source review and writing were AI-assisted.

Mallory is a local content or configuration author who can place an effective .htaccess file containing SSLRequire. In affected Apache HTTP Server releases, that directive can select file-reading expression functions and make the server worker evaluate them with its own filesystem permissions. The boundary is between delegated per-directory configuration and the server account's file access, not between encrypted and unencrypted traffic. This is not a TLS cryptographic failure, and the reviewed evidence does not demonstrate code execution or access beyond the worker's operating-system permissions.

Apache rates CVE-2026-59797 Low, lists 2.4.0–2.4.68 as affected, and identifies 2.4.69, released October 1, 2026, as fixed. I reviewed the public advisory, source snapshots at 2.4.0, 2.4.67, 2.4.68 and 2.4.69, relevant parser history, and the released fix. I did not build or execute a reproducer. Intermediate patch releases were not individually tested or exhaustively inspected; the complete affected range is Apache's published range.

Apache acknowledges me alongside five other finders. This is shared finder credit, not sole-discovery or patch-authorship credit.

SSLRequire evaluates a Boolean expression to decide whether access should be allowed. Its directive registration in modules/ssl/mod_ssl.c permits the AuthConfig override category. Exploitation therefore requires more than sending an ordinary HTTP request: Mallory must be able to author a .htaccess file that the administrator has allowed to use the directive. Disabled overrides or an override list that excludes SSLRequire remove this particular entry point. No deployment prevalence is assumed.

The expected distinction is that the administrator's trusted server configuration may use capabilities that delegated .htaccess authors should not inherit. File functions execute inside httpd, so the operating system applies the server worker's permissions rather than Mallory's own account permissions.

In 2.4.68, server/config.c, ap_parse_htaccess, assigns both parms.pool and parms.temp_pool to r->pool. The common expression parser, server/util_expr_eval.c, ap_expr_parse_cmd_mi, uses that equality to apply the per-directory restriction:

/* Use restricted-contents ap_expr() parser in htaccess context. */
if (cmd->pool == cmd->temp_pool) {
    info->flags |= AP_EXPR_FLAG_RESTRICTED_FILE_FUNC;
}

That is a context check at parse time, not a filesystem permission check. The expression engine subsequently refuses functions marked as restricted when the flag is present.

We can follow the same delegated expression through three operations: parse the directive, select the file function, and evaluate the expression for a request.

In 2.4.68, modules/ssl/ssl_engine_config.c, ssl_cmd_SSLRequire, constructs the expression information itself instead of going through the common command parser. Its decisive setup is:

info->flags = AP_EXPR_FLAG_SSL_EXPR_COMPAT;
info->filename = cmd->directive->filename;
info->line_number = cmd->directive->line_num;
info->module_index = APLOG_MODULE_INDEX;
errstring = ap_expr_parse(cmd->pool, cmd->temp_pool, info, arg, NULL);

The SSL compatibility flag selects legacy comparison semantics; it does not restrict file functions. There is no .htaccess context test between this setup and the call to ap_expr_parse. The common parser's restriction therefore does not reach this path.

The 2.4.68 expression engine registers file and filesize with the RESTRICTED_FILE_FUNC category. Its lookup code rejects that category when AP_EXPR_FLAG_RESTRICTED_FILE_FUNC is set. The missing caller flag leaves these built-in functions available to the SSLRequire expression.

The actual content-read sink is server/util_expr_eval.c, file_func:

if (apr_file_open(&fp, arg, APR_READ|APR_BUFFERED,
                  APR_OS_DEFAULT, ctx->p) != APR_SUCCESS) {
    *ctx->err = apr_psprintf(ctx->p, "Cannot open file %s", arg);
    return "";
}

The argument supplies the path. The remaining function obtains the file size, rejects files larger than its 10 MiB limit, reads the file into an expression string, closes the file and returns that string. Operating-system access controls still apply. An unreadable file produces an expression error; the missing restriction does not bypass the operating system.

At request time, modules/ssl/ssl_engine_kernel.c, ssl_hook_Access, passes each stored requirement to ap_expr_exec. Evaluation errors and false results return HTTP_FORBIDDEN; a true result proceeds past that requirement. This makes the file-derived value usable in an access decision. The code does not itself put the complete file in a response body. A content-dependent allow/deny result can provide an observable predicate, but no extraction run or reliability measurement is claimed here.

Release history

The 2010 parser migration, public change 35cdba6, established mod_ssl's direct ap_expr_parse call. The 2.4.0 snapshot already contains the direct call and the expression engine's file capability. This establishes the vulnerable arrangement in the earliest 2.4 release tag inspected; it does not establish a unique original introducing change across pre-2.4 history.

The central per-directory restriction, shipped before the inspected 2.4.68 snapshot, protects the common parser but leaves this direct caller unchanged. The CVE-2026-59797 fix closes that remaining path in 2.4.69. The reviewed snapshots support the endpoints and mechanism; Apache's advisory supplies the full 2.4.0–2.4.68 range. No independent distribution-backport survey was performed.

The narrow source-confirmed primitive is invocation of file-reading expression functions from delegated SSLRequire configuration. It matters when the worker can read a file that Mallory's own account cannot read and the resulting expression decision is observable.

The necessary prerequisites are an enabled mod_ssl directive, a writable effective .htaccess file, administrator permission to use SSLRequire there, a request that reaches requirement evaluation, and a target file readable by the worker. The attack does not grant root privileges simply because a privileged parent process exists. The reviewed sink runs in request evaluation, and file permissions, service isolation, mandatory access controls and container boundaries remain relevant constraints.

The Boolean access decision limits the immediately demonstrated output channel. A stronger claim of complete arbitrary-file disclosure would need a controlled extraction demonstration or an independently verified trace. Code execution is not established by this path.

Useful runtime controls would compare the same delegated expression on 2.4.68 and 2.4.69, a worker-readable versus worker-unreadable harmless fixture, and an allowed Boolean expression without file access. Another control would exclude SSLRequire through the override configuration. These tests were not performed, so this report does not claim observed responses, logs or fixed-target execution.

No executable PoC, private disclosure payload, captured HTTP response or runtime log is included. This is a source-backed analysis of a publicly released fix, not a reproduced exploitation claim. Only public upstream source and advisory material were used.

A safe regression exercise belongs in a disposable local server with synthetic files and distinct unprivileged author and worker accounts. It should establish that ordinary per-directory expressions still work, that 2.4.68 can resolve the restricted built-in through this caller, and that 2.4.69 refuses it during .htaccess parsing. Those are expected results from the inspected source, not observed test output. Real host secrets are unnecessary for that exercise.

Upgrade to Apache HTTP Server 2.4.69 or a vendor build that explicitly backports CVE-2026-59797. The public 2.4.x fix is SVN r1938672, mirrored by this Apache commit. In the inspected 2.4.69 ssl_cmd_SSLRequire, it adds the missing context-sensitive restriction before parsing:

if (cmd->pool == cmd->temp_pool) {
    info->flags |= AP_EXPR_FLAG_RESTRICTED_FILE_FUNC;
}

This prevents delegated .htaccess expressions from resolving the restricted file functions while retaining the distinction for trusted main configuration. It uses the same context test as the common parser rather than attempting to sanitize individual paths.

Where an immediate upgrade is unavailable, removing untrusted authors' ability to configure SSLRequire in .htaccess, or disabling those overrides where operationally appropriate, removes this entry point. That is a configuration-based mitigation inferred from directive reachability, not a tested replacement for the upstream patch.

Regression coverage should check rejected file and filesize expressions in .htaccess, an ordinary allowed Boolean expression, and any deliberately supported trusted-configuration use. A harmless fixture unreadable by the worker should remain inaccessible regardless of expression context.

CVE-2026-59797 is a delegated-configuration privilege-boundary failure in mod_ssl. SSLRequire called the expression parser without the per-directory file-function restriction, allowing a permitted .htaccess author to reach worker-context file operations. Apache lists 2.4.0–2.4.68 as affected and fixes the direct caller in 2.4.69. The evidence here establishes the source path and shipped restriction, not runtime extraction or code execution.

Public references: Apache advisory and shared finder credit, 2.4.68 directive parser, 2.4.68 expression engine, 2.4.68 request evaluation, 2.4.69 fixed parser.