DNS Response Validation Flaw in dnsjava Package

dnsjava Updated 02 Oct 2025

Summary

22/07/2024
N/A
No i
Unrated
Not published

CVE-2024-25638: dnsjava is an implementation of DNS in Java. Affects dnsjava across 2 version ranges.

< 2073a0cdea2c560465f7ac0cc56f202e6fc39705 < bc51df1c455e6c9fb7cbd42fcb6d62d16047818d

No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

dnsjava is a Java-based implementation of the Domain Name System (DNS) protocol, designed to facilitate DNS queries and responses. It is widely used in various applications for DNS resolution. The package allows developers to interact with DNS servers, manage DNS records, and perform lookups efficiently. However, a critical vulnerability has been identified that compromises the integrity of DNS responses, potentially allowing attackers to exploit the system.

Vulnerability Detail

The vulnerability, identified as CVE-2024-25638, arises from the lack of validation for DNS reply records in relation to the original query. This oversight permits an attacker to respond with resource records (RRs) that belong to different DNS zones, leading to possible data leakage, unauthorized access, or redirection to malicious sites. The flaw exists in all versions prior to 3.6.0, making it crucial for users to upgrade to mitigate risks.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can implement additional validation checks in their application code to ensure that DNS responses are relevant to the original queries. This may involve filtering out any responses that do not match the expected domain or zone.

Conclusion

The CVE-2024-25638 vulnerability in the dnsjava package poses significant risks due to improper validation of DNS responses. Users are strongly advised to upgrade to version 3.6.0 or later to ensure their systems are secure. Implementing temporary workarounds can help mitigate risks until an upgrade is feasible.

See every vulnerability recorded for dnsjava →

Share this vulnerability

FAQ

CVE-2024-25638 is a vulnerability in the dnsjava package that allows attackers to respond with DNS records from different zones, compromising the integrity of DNS queries.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The risks include data leakage, unauthorized access to sensitive information, and possible redirection to malicious websites, which can lead to further exploitation.

Yes, the vulnerability is fixed in version 3.6.0 of the dnsjava package. It is recommended to upgrade to this version or later.

If an immediate upgrade is not possible, implement additional validation checks in your application to filter out irrelevant DNS responses as a temporary workaround.

Related vulnerabilities

Recent vulnerabilities recorded for dnsjava.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback