Cloudanix VulnDB

CVE-2024-34447

High · 7.5

CVSS

7.5

EPSS

0.8%

Published

May 3, 2024

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

Some Java applications may be tricked into sending supposedly secure data to the wrong server if an attacker can tamper with DNS lookups.

Chainable
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Moderate
Impact
Data Exposure
Component
Library
Class
Cryptographic Weakness
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

This vulnerability affects Bouncy Castle’s Java TLS/JSSE implementation. In vulnerable versions, when endpoint identification is enabled but an SSL socket is created without an explicit hostname, hostname verification may be performed against a DNS-resolved IP address instead of the intended DNS name. If an attacker can poison, spoof, or otherwise influence DNS resolution, they may be able to cause the client to validate the wrong endpoint identity and establish a TLS connection to an attacker-controlled service. The main technical impact is loss of TLS server authentication, which can enable interception of confidential traffic.

Why it matters to the business

Applications that rely on affected Bouncy Castle TLS components may believe they are securely connecting to a trusted service while actually connecting to an attacker-controlled endpoint. This can expose sensitive data in transit, including credentials, tokens, API payloads, and business data exchanged over HTTPS or TLS-backed integrations. The issue is not listed in CISA KEV and has a low EPSS score, so broad active exploitation is not currently indicated, but the impact can be serious for systems operating in hostile networks or relying on DNS paths that can be manipulated.

How an attack unfolds

An attacker first needs a position where they can influence DNS responses or network routing for a Java application using the vulnerable Bouncy Castle JSSE/TLS implementation. The target application must create TLS sockets without passing an explicit hostname, such as through patterns involving HttpsURLConnection, while endpoint identification is enabled. The attacker poisons or spoofs DNS so the intended service name resolves to an attacker-controlled IP address. Because of the flaw, hostname verification may be performed against the resolved IP address rather than the intended hostname, allowing the TLS connection to proceed under conditions where it should fail. Once the connection is established, the attacker can observe or capture confidential data sent by the client, and may potentially relay or manipulate higher-level application traffic depending on the protocol and application behavior.

How to fix it

Upgrade affected Bouncy Castle TLS components to fixed versions. Use BC TLS Java 1.0.19 or later, which is included with BC Java 1.78 and BC Java LTS 2.73.6, or use BC FIPS TLS Java 1.0.19 or later for FIPS deployments. Review dependency trees because Bouncy Castle may be included transitively by frameworks, application servers, security libraries, SDKs, or vendor products. Where immediate upgrade is not possible, mitigate by ensuring TLS connections are created with an explicit expected hostname, avoiding ambiguous socket construction patterns, hardening DNS resolution, and restricting outbound connections to known trusted destinations. Do not rely on DNS controls alone as a permanent fix.

How to confirm the fix worked

Confirm that deployed applications no longer include vulnerable Bouncy Castle TLS artifacts. Validate runtime and build-time dependency versions for bcprov, bctls, bcpkix, bc-fips, and related Bouncy Castle packages, and ensure the TLS component is at BC TLS Java 1.0.19 or later, BC Java 1.78 or later, BC Java LTS 2.73.6 or later, or BC FIPS TLS Java 1.0.19 or later as applicable. Test representative TLS client paths to confirm the intended hostname is explicitly supplied and hostname verification fails when connecting to a certificate or endpoint that does not match the requested DNS name. Software composition analysis, Maven or Gradle dependency reports, container image scans, and runtime classpath inspection should all agree that no vulnerable versions remain.

Typical attack path

  1. Identify a Java application using a vulnerable Bouncy Castle BCJSSE or BC FIPS TLS version.
  2. Gain the ability to influence DNS resolution or network name resolution for the application.
  3. Cause the target service hostname to resolve to an attacker-controlled IP address.
  4. Present a TLS endpoint that satisfies the flawed verification path used by the vulnerable library.
  5. Allow the client application to establish what it believes is a trusted TLS connection.
  6. Capture, relay, or abuse sensitive data transmitted by the client over the misdirected TLS session.

How to detect it

There are no universal exploit artifacts for this issue because exploitation depends on DNS manipulation and application-specific TLS client behavior. To investigate possible prior exploitation, review DNS resolver logs, endpoint DNS cache artifacts, proxy logs, firewall logs, VPC flow logs, NetFlow, and application outbound connection logs for cases where trusted service hostnames resolved to unusual or unauthorized IP addresses. Compare historical DNS answers for sensitive external service names against expected provider IP ranges. Look for TLS connections from Java applications to destinations that do not match normal service ownership, geography, ASN, or certificate patterns. If full packet capture or TLS metadata is available, review SNI, certificate subject alternative names, destination IPs, and timing around suspicious DNS responses. Application logs may show connection attempts, certificate validation anomalies, retries, or unexpected remote addresses, but successful exploitation may leave little evidence if the application did not log resolved addresses or TLS peer details.

What your security team should do

  • Inventory Java applications and services that use Bouncy Castle JSSE/TLS, including transitive dependencies and embedded JAR files.
  • Prioritize upgrades for applications that transmit credentials, tokens, regulated data, payment data, or sensitive business information over outbound TLS connections.
  • Upgrade to BC TLS Java 1.0.19 or later, BC Java 1.78 or later, BC Java LTS 2.73.6 or later, or BC FIPS TLS Java 1.0.19 or later as appropriate.
  • Review application code for TLS socket creation without an explicit hostname, especially use of HttpsURLConnection and custom SSLSocketFactory integrations.
  • Harden DNS and egress controls for affected applications until upgrades are complete.
  • Monitor for unusual DNS answers, unexpected destination IPs for trusted service names, and TLS connections to infrastructure not normally associated with expected endpoints.
  • Add dependency checks to CI/CD pipelines so vulnerable Bouncy Castle versions are blocked from reintroduction.

The record

An issue was discovered in the Bouncy Castle Crypto Package For Java before BC TLS Java 1.0.19 (ships with BC Java 1.78, BC Java (LTS) 2.73.6) and before BC FIPS TLS Java 1.0.19. When endpoint identification is enabled in the BCJSSE and an SSL socket is created without an explicit hostname (as happens with HttpsURLConnection), hostname verification could be performed against a DNS-resolved IP address in some situations, opening up a possibility of DNS poisoning.

Affected packages

Ecosystem Package Introduced Fixed
Maven org.bouncycastle:bcprov-jdk12 1.61 1.78
Maven org.bouncycastle:bcprov-jdk13 1.61 1.78
Maven org.bouncycastle:bcprov-jdk14 1.61 1.78
Maven org.bouncycastle:bcprov-jdk15to18 1.61 1.78
Maven org.bouncycastle:bcprov-jdk18on 1.61 1.78
Maven org.bouncycastle:bcprov-lts8on 0 2.73.6
Maven org.bouncycastle:bctls-fips 0 1.0.19
Chainguard apache-nifi 0 1.26.0-r2
Chainguard apache-nifi 0 2.6.0-r2
Chainguard apache-nifi-compat 0 2.6.0-r2
Chainguard apache-nifi-toolkit 0 2.6.0-r2
Chainguard elasticsearch-7 0 7.17.22-r0
Chainguard elasticsearch-7-bitnami 0 7.17.22-r0
Chainguard elasticsearch-7-iamguarded 0 7.17.22-r0
Chainguard elasticsearch-8 0 8.13.4-r1
Chainguard elasticsearch-8-bitnami 0 8.13.4-r1
Chainguard elasticsearch-8-config 0 8.13.4-r1
Chainguard elasticsearch-8-iamguarded 0 8.13.4-r1
Chainguard elasticsearch-config 0 8.13.4-r1
Chainguard elasticsearch-fips-8 0 8.13.4-r1
Chainguard elasticsearch-fips-8-bitnami 0 8.13.4-r1
Chainguard elasticsearch-fips-8-config 0 8.13.4-r1
Chainguard elasticsearch-fips-8-policy-140-2 0 8.13.4-r1
Chainguard elasticsearch-fips-8-policy-140-3 0 8.13.4-r1
Chainguard gradle-8 0 8.7.0-r4
Chainguard hive 0 4.0.1-r1
Chainguard hive-compat 0 4.0.1-r1
Chainguard jenkins 0 2.459-r0
Chainguard jruby-9.4 0 9.4.8.0-r0
Chainguard jruby-9.4-default-ruby 0 9.4.8.0-r0
Chainguard keycloak 0 25.0.0-r0
Chainguard keycloak-bitnami-compat 0 25.0.0-r0
Chainguard keycloak-bitnami-fips 0 25.0.0-r0
Chainguard keycloak-compat 0 25.0.0-r0
Chainguard keycloak-fips 0 25.0.0-r0
Chainguard keycloak-fips-bitnami-compat 0 25.0.0-r0
Chainguard keycloak-fips-policy-140-2 0 25.0.0-r0
Chainguard keycloak-fips-policy-140-3 0 25.0.0-r0
Chainguard keycloak-iamguarded-compat 0 25.0.0-r0
Chainguard keycloak-iamguarded-fips 0 25.0.0-r0
Chainguard logstash 0 8.15.0-r0
Chainguard logstash-compat 0 8.15.0-r0
Chainguard logstash-env2yaml 0 8.15.0-r0
Chainguard logstash-jre-bcfips 0 8.13.4-r0
Chainguard logstash-with-output-opensearch 0 8.15.0-r0
Chainguard opensearch-2 0 2.16.0-r0
Chainguard opensearch-2-alerting 0 2.16.0-r0
Chainguard opensearch-2-analysis-icu 0 2.16.0-r0
Chainguard opensearch-2-analysis-kuromoji 0 2.16.0-r0
Chainguard opensearch-2-analysis-nori 0 2.16.0-r0
Chainguard opensearch-2-analysis-phonetic 0 2.16.0-r0
Chainguard opensearch-2-analysis-smartcn 0 2.16.0-r0
Chainguard opensearch-2-analysis-stempel 0 2.16.0-r0
Chainguard opensearch-2-analysis-ukrainian 0 2.16.0-r0
Chainguard opensearch-2-anomaly-detection 0 2.16.0-r0
Chainguard opensearch-2-asynchronous-search 0 2.16.0-r0
Chainguard opensearch-2-cross-cluster-replication 0 2.16.0-r0
Chainguard opensearch-2-crypto-kms 0 2.16.0-r0
Chainguard opensearch-2-custom-codecs 0 2.16.0-r0
Chainguard opensearch-2-discovery-azure-classic 0 2.16.0-r0
Chainguard opensearch-2-discovery-ec2 0 2.16.0-r0
Chainguard opensearch-2-discovery-gce 0 2.16.0-r0
Chainguard opensearch-2-entrypoint-compat 0 2.16.0-r0
Chainguard opensearch-2-geospatial 0 2.16.0-r0
Chainguard opensearch-2-identity-shiro 0 2.16.0-r0
Chainguard opensearch-2-index-management 0 2.16.0-r0
Chainguard opensearch-2-ingest-attachment 0 2.16.0-r0
Chainguard opensearch-2-job-scheduler 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-alerting 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-analysis-icu 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-analysis-kuromoji 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-analysis-nori 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-analysis-phonetic 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-analysis-smartcn 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-analysis-stempel 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-analysis-ukrainian 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-anomaly-detection 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-asynchronous-search 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-cross-cluster-replication 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-crypto-kms 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-custom-codecs 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-discovery-azure-classic 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-discovery-ec2 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-discovery-gce 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-geospatial 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-identity-shiro 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-index-management 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-ingest-attachment 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-job-scheduler 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-k-nn 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-mapper-annotated-text 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-mapper-murmur3 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-mapper-size 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-ml-commons 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-neural-search 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-notifications 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-observability 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-performance-analyzer 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-reporting 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-repository-azure 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-repository-gcs 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-repository-s3 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-security 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-security-analytics 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-sql 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-store-smb 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-telemetry-otel 0 2.16.0-r0
Chainguard opensearch-2-jre-bcfips-transport-nio 0 2.16.0-r0
Chainguard opensearch-2-k-nn 0 2.16.0-r0
Chainguard opensearch-2-mapper-annotated-text 0 2.16.0-r0
Chainguard opensearch-2-mapper-murmur3 0 2.16.0-r0
Chainguard opensearch-2-mapper-size 0 2.16.0-r0
Chainguard opensearch-2-ml-commons 0 2.16.0-r0
Chainguard opensearch-2-neural-search 0 2.16.0-r0
Chainguard opensearch-2-notifications 0 2.16.0-r0
Chainguard opensearch-2-observability 0 2.16.0-r0
Chainguard opensearch-2-performance-analyzer 0 2.16.0-r0
Chainguard opensearch-2-reporting 0 2.16.0-r0
Chainguard opensearch-2-repository-azure 0 2.16.0-r0
Chainguard opensearch-2-repository-gcs 0 2.16.0-r0
Chainguard opensearch-2-repository-s3 0 2.16.0-r0
Chainguard opensearch-2-security 0 2.16.0-r0
Chainguard opensearch-2-security-analytics 0 2.16.0-r0
Chainguard opensearch-2-sql 0 2.16.0-r0
Chainguard opensearch-2-store-smb 0 2.16.0-r0
Chainguard opensearch-2-telemetry-otel 0 2.16.0-r0
Chainguard opensearch-2-transport-nio 0 2.16.0-r0
Chainguard ruby3.2-bouncy-castle-java 0 1.5.0146.1-r4
Chainguard ruby3.3-bouncy-castle-java 0 1.5.0146.1-r1
Chainguard sonarqube 0 25.10.0.114319-r0
Chainguard sonarqube-10 0 25.3.0.104237-r0
Chainguard sonarqube-10-docker-compat 0 25.3.0.104237-r0
Chainguard sonarqube-10-scripts 0 25.3.0.104237-r0
Chainguard sonarqube-docker-compat 0 25.10.0.114319-r0
Chainguard sonarqube-scripts 0 25.10.0.114319-r0
Debian:11 bouncycastle 0 No fix
Debian:12 bouncycastle 0 No fix
Debian:13 bouncycastle 0 No fix
Ubuntu:16.04:LTS bouncycastle 0 No fix
Ubuntu:18.04:LTS bouncycastle 0 No fix
Ubuntu:20.04:LTS bouncycastle 0 No fix
Ubuntu:22.04:LTS bouncycastle 0 No fix
Ubuntu:24.04:LTS bouncycastle 0 No fix
Ubuntu:24.10 bouncycastle 0 No fix
Ubuntu:25.04 bouncycastle 0 No fix
Ubuntu:25.10 bouncycastle 0 No fix
Ubuntu:Pro:16.04:LTS bouncycastle 0 No fix
Ubuntu:Pro:18.04:LTS bouncycastle 0 No fix
Ubuntu:Pro:20.04:LTS bouncycastle 0 No fix
Wolfi apache-nifi 0 2.6.0-r2
Wolfi apache-nifi-compat 0 2.6.0-r2
Wolfi apache-nifi-toolkit 0 2.6.0-r2
Wolfi gradle-8 0 8.7.0-r4
Wolfi jruby-9.4 0 9.4.8.0-r0
Wolfi jruby-9.4-default-ruby 0 9.4.8.0-r0
Wolfi keycloak 0 25.0.0-r0
Wolfi keycloak-bitnami-compat 0 25.0.0-r0
Wolfi keycloak-compat 0 25.0.0-r0
Wolfi keycloak-iamguarded-compat 0 25.0.0-r0
Wolfi logstash 0 8.15.0-r0
Wolfi logstash-compat 0 8.15.0-r0
Wolfi logstash-env2yaml 0 8.15.0-r0
Wolfi logstash-with-output-opensearch 0 8.15.0-r0
Wolfi opensearch-2 0 2.16.0-r0
Wolfi opensearch-2-alerting 0 2.16.0-r0
Wolfi opensearch-2-analysis-icu 0 2.16.0-r0
Wolfi opensearch-2-analysis-kuromoji 0 2.16.0-r0
Wolfi opensearch-2-analysis-nori 0 2.16.0-r0
Wolfi opensearch-2-analysis-phonetic 0 2.16.0-r0
Wolfi opensearch-2-analysis-smartcn 0 2.16.0-r0
Wolfi opensearch-2-analysis-stempel 0 2.16.0-r0
Wolfi opensearch-2-analysis-ukrainian 0 2.16.0-r0
Wolfi opensearch-2-anomaly-detection 0 2.16.0-r0
Wolfi opensearch-2-asynchronous-search 0 2.16.0-r0
Wolfi opensearch-2-cross-cluster-replication 0 2.16.0-r0
Wolfi opensearch-2-crypto-kms 0 2.16.0-r0
Wolfi opensearch-2-custom-codecs 0 2.16.0-r0
Wolfi opensearch-2-discovery-azure-classic 0 2.16.0-r0
Wolfi opensearch-2-discovery-ec2 0 2.16.0-r0
Wolfi opensearch-2-discovery-gce 0 2.16.0-r0
Wolfi opensearch-2-geospatial 0 2.16.0-r0
Wolfi opensearch-2-identity-shiro 0 2.16.0-r0
Wolfi opensearch-2-index-management 0 2.16.0-r0
Wolfi opensearch-2-ingest-attachment 0 2.16.0-r0
Wolfi opensearch-2-job-scheduler 0 2.16.0-r0
Wolfi opensearch-2-k-nn 0 2.16.0-r0
Wolfi opensearch-2-mapper-annotated-text 0 2.16.0-r0
Wolfi opensearch-2-mapper-murmur3 0 2.16.0-r0
Wolfi opensearch-2-mapper-size 0 2.16.0-r0
Wolfi opensearch-2-ml-commons 0 2.16.0-r0
Wolfi opensearch-2-neural-search 0 2.16.0-r0
Wolfi opensearch-2-notifications 0 2.16.0-r0
Wolfi opensearch-2-observability 0 2.16.0-r0
Wolfi opensearch-2-performance-analyzer 0 2.16.0-r0
Wolfi opensearch-2-reporting 0 2.16.0-r0
Wolfi opensearch-2-repository-azure 0 2.16.0-r0
Wolfi opensearch-2-repository-gcs 0 2.16.0-r0
Wolfi opensearch-2-repository-s3 0 2.16.0-r0
Wolfi opensearch-2-security 0 2.16.0-r0

Related vulnerabilities