Summary
ServerCo getssl before 2.49 mishandles ACME challenge tokens by not strictly validating them against RFC 8555 before using them to construct local filenames and paths.
A malicious or compromised ACME responder, or an on-path attacker able to tamper with challenge responses, could abuse this to write arbitrary files via path traversal, which may escalate to remote command execution under elevated privileges.
Affected context
This vulnerability appears in deployments using ServerCo getssl (version 2.49 and earlier) to automate ACME certificate issuance.
The issue is specifically tied to challenge-file handling, where tokens returned by the ACME server are consumed without strict RFC 8555 validation before being incorporated into filesystem operations.
Environments where getssl runs with elevated privileges or has access to sensitive directories are more exposed, and risk is higher when the ACME response path can be influenced or intercepted by an attacker.
Exploit preconditions
- Attack surface: ACME HTTP/HTTPS interaction between getssl and the certificate authority (CA) or ACME endpoint.
- Required access: Ability to supply or tamper with ACME challenge responses sent to getssl (e.g., malicious/compromised CA, on-path network attacker, or any component able to spoof ACME responses).
- Trigger point: getssl processing an ACME challenge token and using it to build a local path/filename for challenge-file creation or verification.
- Why exploitation is possible: The challenge token is not sufficiently validated for structure and allowed characters per RFC 8555, allowing attacker-controlled sequences (such as path traversal constructs) to influence filesystem paths used by getssl.
Why this happens
The core issue is the external control of filenames and paths (CWE-73) during ACME challenge processing.
Instead of treating the ACME token as untrusted input and strictly normalizing/validating it, getssl incorporates the token directly into filesystem paths for challenge-file handling.
This insecure pattern allows an attacker-controlled token to escape intended directories, traverse the filesystem, and potentially overwrite or create files in arbitrary locations, especially when combined with elevated execution privileges.
Potential impact
- Arbitrary file creation or overwrite in directories writable by the getssl process.
- Path traversal outside the intended ACME challenge directory structure.
- Modification of configuration files or scripts that may later be executed, enabling remote command injection.
- Escalation from web-facing ACME interaction to broader system compromise, depending on privilege level and file system layout.
- Interference with certificate issuance or denial of service by corrupting application or system files.
General mitigation guidance
Mitigation typically focuses on eliminating external control over filesystem paths and strictly validating untrusted inputs used in file operations.
Effective defensive patterns include:
- Applying rigorous validation and normalization of ACME tokens, enforcing RFC 8555 constraints (allowed character set, length, format) and rejecting unexpected tokens.
- Constructing challenge file paths using fixed, predefined directories and safe joining functions, ensuring tokens are treated as opaque identifiers rather than path fragments.
- Enforcing checks to prevent directory traversal (e.g., rejecting tokens containing path separators or traversal patterns after normalization).
- Running getssl and related ACME handlers under least-privilege accounts with minimal filesystem write access, particularly avoiding write permissions on configuration, script, or system directories.
- Isolating ACME challenge handling into a constrained directory or chroot/jail where possible, reducing the blast radius of any path-related misuse.
How teams detect issues like this
Detection approaches generally aim to spot untrusted input flowing into path construction and anomalous filesystem behavior during ACME operations.
Representative strategies include:
- Static analysis rules that flag direct concatenation of network-sourced tokens or parameters into file paths without validation or normalization routines.
- Code review checklists emphasizing scrutiny of ACME challenge handling logic, especially where tokens are used in file creation, deletion, or permission changes.
- Runtime monitoring or logging to capture unexpected file writes during ACME challenges, including alerts for files created outside designated challenge directories.
- Policy-based security controls (such as mandatory access control profiles) that prevent the ACME handler from writing outside its intended working directory, and logging attempts that violate these policies.

