Skip to content

openssl on Windows built with openssldir set from the build machine (Uncontrolled Search Path Element)

High
BillyONeal published GHSA-p322-v6vw-vrq9 Mar 25, 2026

Package

vcpkg openssl (vcpkg)

Affected versions

< 3.6.1#2

Patched versions

3.6.1#3

Description

Summary

vcpkg's Windows builds of OpenSSL set openssldir to a path on the build machine, making that path be attackable later on customer machines.

Details

This was initially reported by Xavier DANEST working with TrendAI Zero Day Initiative and assigned ZDI-CAN-29616 (visible on https://www.zerodayinitiative.com/advisories/upcoming/ ). There is a 'file lay in wait' class of elevation of privilege vulnerabilities arising from OpenSSL hard coding search paths for DLLs. vcpkg's OpenSSL port sets openssldir to a path from the build machine in order to get built results to be placed correctly, but this means OpenSSL will search that path for engines to load in the future.

A low privilege user on a different machine can create the same path, which would hijack a later high privilege user deploying an OpenSSL vcpkg happened to build at that location.

The OpenSSL documentation explicitly notes this problem and says that redirecting built results needs to be done with DESTDIR, not by changing openssldir: https://github.com/openssl/openssl/blob/master/INSTALL.md#directories + https://github.com/openssl/openssl/blob/master/INSTALL.md#additional-directories

vcpkg port 3.6.1#3 for OpenSSL changes vcpkg's build for Windows to not set openssldir at all, leaving OpenSSL's default path under Program Files. Program Files is assumed to be acceptable because writing there generally requires administrative permissions. In an ideal universe we would configure OpenSSL to not search this at all, but they don't appear to offer such a setting.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CVE ID

CVE-2026-34054

Weaknesses

Uncontrolled Search Path Element

The product uses a fixed or controlled search path to find resources, but one or more locations in that path can be under the control of unintended actors. Learn more on MITRE.