CVE-2024-25638
High · 8.9CVSS
8.9
EPSS
0.4%
Published
Jul 22, 2024
CISA due date
—
Cloudanix analysis
A widely used Java tool for looking up internet addresses fails to check that answers it receives actually match the question it asked, letting attackers slip in wrong addresses that could send users or services to the wrong places.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- High
- Impact
- Data Tampering
- Component
- Library
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The library accepts DNS resource records in replies without verifying they match the original query's name, type, or class, enabling injection of records from unrelated zones into resolver responses.
Why it matters to the business
Applications relying on this DNS library can be tricked into using attacker-supplied addresses or data, leading to traffic redirection, service disruption, or exposure of internal systems; the issue affects many Java projects that depend on dnsjava, increasing the scope of potential impact across the ecosystem.
How an attack unfolds
An attacker positioned to observe or influence DNS traffic sends a crafted reply containing resource records from a different zone; because the library performs no relevance validation, these extraneous records are processed and cached or returned to the calling application, allowing subsequent queries to resolve to attacker-controlled endpoints.
How to fix it
Upgrade dnsjava to version 3.6.0 or later (commit fd1d7c9280986ebb219c421695a902559aaeda22). For the affected Ubuntu package, apply the listed fixed versions. Validate that all direct and transitive dependencies are updated and test DNS resolution behavior after deployment.
How to confirm the fix worked
Confirm the dnsjava version in use matches or exceeds 3.6.0, review application dependency manifests, and perform controlled DNS queries to verify that only relevant records from the queried zone are accepted.
Typical attack path
- Identify an application using the vulnerable dnsjava library for DNS resolution
- Observe or trigger a DNS query from the target
- Craft and transmit a UDP or TCP DNS response containing resource records from an unrelated zone
- Have the library accept and use the injected records for subsequent operations
- Redirect application traffic or obtain unauthorized data via the poisoned responses
How to detect it
Examine DNS resolver logs and application debug output for responses containing resource records whose names or zones do not match the original query; correlate with network captures showing unsolicited or out-of-zone records accepted by the resolver.
What your security team should do
- Immediately inventory all Java applications and services that depend on dnsjava and prioritize upgrades to 3.6.0
- Implement network-level DNS query monitoring to detect anomalous responses during the remediation window
- Add dependency scanning to CI/CD pipelines to prevent reintroduction of vulnerable versions
- Review logging configurations to ensure DNS response details are captured for future incident response
The record
dnsjava is an implementation of DNS in Java. Records in DNS replies are not checked for their relevance to the query, allowing an attacker to respond with RRs from different zones. This vulnerability is fixed in 3.6.0.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Maven | dnsjava:dnsjava | 0 | 3.6.0 |
| Chainguard | apache-nifi | 0 | 2.0.0-r0 |
| Chainguard | apache-nifi-compat | 0 | 2.0.0-r0 |
| Chainguard | apache-nifi-toolkit | 0 | 2.0.0-r0 |
| Chainguard | druid-compat | 0 | 34.0.0-r6 |
| Chainguard | hadoop-client-modules | 0 | 3.3.6-r8 |
| Chainguard | spark-3.5 | 0 | 3.5.7-r2 |
| Chainguard | spark-3.5-scala-2.12-compat | 0 | 3.5.7-r2 |
| Chainguard | spark-3.5-scala-2.12-iamguarded-compat | 0 | 3.5.7-r2 |
| Chainguard | spark-3.5-scala-2.13-compat | 0 | 3.5.7-r2 |
| Chainguard | spark-fips-3.5 | 0 | 3.5.4-r17 |
| Chainguard | spark-fips-3.5-scala-2.12-compat | 0 | 3.5.4-r17 |
| Chainguard | spark-fips-3.5-scala-2.13-compat | 0 | 3.5.4-r17 |
| Chainguard | tez | 0 | 0.10.4-r6 |
| Debian:11 | dnsjava | 0 | No fix |
| Debian:12 | dnsjava | 0 | No fix |
| Debian:13 | dnsjava | 0 | 3.6.2-1 |
| Ubuntu:16.04:LTS | dnsjava | 0 | No fix |
| Ubuntu:18.04:LTS | dnsjava | 0 | No fix |
| Ubuntu:20.04:LTS | dnsjava | 0 | No fix |
| Ubuntu:22.04:LTS | dnsjava | 0 | No fix |
| Ubuntu:24.04:LTS | dnsjava | 0 | No fix |
| Ubuntu:24.10 | dnsjava | 0 | No fix |
| Ubuntu:25.04 | dnsjava | 0 | No fix |
| Ubuntu:25.10 | dnsjava | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | dnsjava | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | dnsjava | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | dnsjava | 0 | No fix |
| Wolfi | apache-nifi | 0 | 2.0.0-r0 |
| Wolfi | apache-nifi-compat | 0 | 2.0.0-r0 |
| Wolfi | apache-nifi-toolkit | 0 | 2.0.0-r0 |
| Wolfi | druid-compat | 0 | 34.0.0-r6 |
| Wolfi | spark-3.5 | 0 | 3.5.7-r2 |
| Wolfi | spark-3.5-scala-2.12-compat | 0 | 3.5.7-r2 |
| Wolfi | spark-3.5-scala-2.12-iamguarded-compat | 0 | 3.5.7-r2 |
| Wolfi | spark-3.5-scala-2.13-compat | 0 | 3.5.7-r2 |
| Wolfi | tez | 0 | 0.10.4-r6 |
Related vulnerabilities
- CVE-2026-22732 When applications specify HTTP response headers for servlet applications using Spring… Also affects apache-nifi
- CVE-2026-24281 Hostname verification in Apache ZooKeeper ZKTrustManager falls back to reverse DNS (PTR)… Also affects apache-nifi
- CVE-2026-24308 Improper handling of configuration values in ZKConfig in Apache ZooKeeper 3.8.5 and 3.9.4… Also affects apache-nifi
- CVE-2026-29062 jackson-core contains core low-level incremental ("streaming") parser and generator… Also affects apache-nifi
- CVE-2026-1225 ACE vulnerability in configuration file processing by QOS.CH logback-core up to and… Also affects apache-nifi
- CVE-2025-14763 Missing cryptographic key commitment in the Amazon S3 Encryption Client for Java may… Also affects apache-nifi
- CVE-2024-29371 In jose4j before 0.9.5, an attacker can cause a Denial-of-Service (DoS) condition by… Also affects apache-nifi
- CVE-2025-67735 Netty has a CRLF Injection vulnerability in io.netty.handler.codec.http.HttpRequestEncoder Also affects apache-nifi