Description
The fanx_fingerprint function in ssl/sslxprint.c of ssldump allocates a heap buffer for formatting FAN/1 X.509 certificate fingerprints. The allocation size is computed as strlen(b64) + strlen(hex) + 31, but the format string "fan1:x509:server:passive:%s:sha256:%s" contains 33 fixed characters in addition to the two variable-length fields and a null terminator, requiring strlen(b64) + strlen(hex) + 34 bytes. This miscalculation results in a 3-byte heap-based buffer overflow on every invocation of the function with valid inputs. The overflow occurs because sprintf writes the full formatted string into the undersized heap buffer without bounds checking. An attacker who can supply a crafted pcap file containing a TLS X.509 certificate to a user running ssldump with FAN/1 fingerprinting enabled (for example with the -j -N options) can trigger the overflow. The resulting heap corruption may lead to denial of service through a crash or, in a worst-case scenario, arbitrary code execution in the context of the user running ssldump. The vulnerability is deterministic and requires no special privileges beyond the ability to provide input to the tool.
Published: 2026-10-16
Score: 6.8 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Arbitrary Code Execution
Action: Patch Immediately
AI Analysis

Impact

The fanx_fingerprint function incorrectly calculates the buffer size for formatting FAN/1 X.509 certificate fingerprints, allocating only strlen(b64)+strlen(hex)+31 bytes while the format string requires 33 fixed characters plus a null terminator, producing a 3‑byte heap overflow. The overflow occurs through an unbounded sprintf that writes the full string to the undersized buffer. If an attacker supplies a crafted pcap file containing a TLS X.509 certificate to a user running ssldump with FAN/1 fingerprinting enabled, the corruption can abort the program or, in the worst case, allow the attacker to execute arbitrary code in the context of the ssldump process. The vulnerability is deterministic, requires no elevated privileges, and is triggered by valid input data. It maps to CWE‑122 (Heap Buffer Overflow) and CWE‑787 (Out‑of‑Bounds Write).

Affected Systems

All installations of ssldump from the adulau repository are affected. The vulnerability exists in every release that has not applied the patch located in the commit 8ad55683cc0186600c085d33be5a5b627db78467, where the hard‑coded size calculation and unbounded sprintf were replaced by a safe snprintf approach. No specific version range is listed, so any version before the commit is potentially vulnerable until the fix is applied.

Risk and Exploitability

The CVSS score of 6.8 indicates medium‑to‑high severity. EPSS is not available, and the issue is not listed in CISA’s KEV catalog, but the exploitability is high because the overflow occurs on every function call with valid input and requires only that a user execute ssldump with a malicious pcap file. Attackers can gain code execution or cause denial of service without needing elevated privileges, making it a significant local threat for users who run ssldump on untrusted capture files.

Generated by OpenCVE AI on October 16, 2026 at 12:41 UTC.

Remediation

Vendor Solution

The fix replaces the hardcoded size calculation and unbounded sprintf with a two-step snprintf approach: first computing the exact required output length via snprintf(NULL, 0, format, b64, hex), then allocating precisely that length plus one byte for the null terminator via calloc, and finally writing the formatted string with a bounded snprintf. This eliminates the undersized allocation and guarantees the write never exceeds the allocated buffer.


OpenCVE Recommended Actions

  • Install the latest ssldump release that includes the corrected buffer allocation and formatting logic.
  • If an upgrade cannot be performed immediately, avoid enabling FAN/1 fingerprinting by omitting the -j or -N options or by explicitly disabling.
  • Run ssldump under a least‑privilege user account or in a sandboxed environment to limit the impact of possible heap corruption.

Generated by OpenCVE AI on October 16, 2026 at 12:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 16 Oct 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 16 Oct 2026 05:45:00 +0000

Type Values Removed Values Added
Description The fanx_fingerprint function in ssl/sslxprint.c of ssldump allocates a heap buffer for formatting FAN/1 X.509 certificate fingerprints. The allocation size is computed as strlen(b64) + strlen(hex) + 31, but the format string "fan1:x509:server:passive:%s:sha256:%s" contains 33 fixed characters in addition to the two variable-length fields and a null terminator, requiring strlen(b64) + strlen(hex) + 34 bytes. This miscalculation results in a 3-byte heap-based buffer overflow on every invocation of the function with valid inputs. The overflow occurs because sprintf writes the full formatted string into the undersized heap buffer without bounds checking. An attacker who can supply a crafted pcap file containing a TLS X.509 certificate to a user running ssldump with FAN/1 fingerprinting enabled (for example with the -j -N options) can trigger the overflow. The resulting heap corruption may lead to denial of service through a crash or, in a worst-case scenario, arbitrary code execution in the context of the user running ssldump. The vulnerability is deterministic and requires no special privileges beyond the ability to provide input to the tool.
Title ssldump Heap Buffer Overflow in FAN/1 X.509 Fingerprint Formatting
First Time appeared Adulau
Adulau ssldump
Weaknesses CWE-122
CWE-787
CPEs cpe:2.3:a:adulau:ssldump:*:*:*:*:*:*:*:*
Vendors & Products Adulau
Adulau ssldump
References
Metrics cvssV4_0

{'score': 6.8, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: CIRCL

Published:

Updated: 2026-10-16T12:30:53.251Z

Reserved: 2026-10-16T05:24:32.520Z

Link: CVE-2026-111458

cve-icon Vulnrichment

Updated: 2026-10-16T12:30:48.643Z

cve-icon NVD

Status : Received

Published: 2026-10-16T06:17:09.510

Modified: 2026-10-16T13:16:56.427

Link: CVE-2026-111458

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-16T13:26:05Z

Weaknesses