Critical Vulnerability in dnsjava: Inadequate DNS Reply Validation

dnsjava Updated 02 Oct 2025

Summary

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

DEBIAN-CVE-2024-25638: dnsjava is an implementation of DNS in Java. Affects dnsjava versions < 3.6.2-1. Fixed in 3.6.2-1. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

dnsjava is a robust implementation of the Domain Name System (DNS) in Java, designed to facilitate DNS operations such as querying and responding to DNS requests. It is widely used in applications that require DNS functionalities. However, dnsjava has a critical vulnerability that allows attackers to exploit the system by sending irrelevant DNS records in response to queries, potentially leading to data leakage or manipulation.

Vulnerability Detail

The vulnerability arises from the failure of dnsjava to validate the relevance of DNS reply records to the original query. This oversight allows an attacker to respond with Resource Records (RRs) from different zones, which can mislead applications relying on accurate DNS responses. The ramifications of this vulnerability include potential data exposure, unauthorized access, and the ability to manipulate DNS responses, which could compromise the integrity of applications using dnsjava.

How To Fix

Minimum fixed version

3.6.2-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade dnsjava

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, consider implementing additional validation checks in your application to verify the relevance of DNS replies before processing them. This can help mitigate the risk until the package is updated.

Conclusion

The dnsjava package has a critical vulnerability that allows attackers to exploit DNS reply validation failures. It is crucial to update to the patched version 3.6.2-1 to mitigate risks. Users are encouraged to monitor their applications for vulnerabilities using tools like Vulert.

See every vulnerability recorded for dnsjava →

Share this vulnerability

FAQ

The vulnerability allows attackers to send irrelevant DNS records in response to queries, which can lead to data manipulation and exposure.

You can use Vulert, which monitors open-source vulnerabilities in real-time. Simply upload your manifest file like package-lock.json to check for vulnerabilities.

Consequences include unauthorized access to sensitive data, manipulation of DNS responses, and potential disruption of services relying on dnsjava.

Yes, the vulnerability is fixed in version 3.6.2-1 of dnsjava. Updating to this version will resolve the issue.

Implement additional validation checks in your application to ensure that DNS replies are relevant to the original queries as a temporary measure.

Related vulnerabilities

Recent vulnerabilities recorded for dnsjava.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

3.6.2-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade dnsjava

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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