Acceptance of Extraneous Untrusted Data With Trusted Data Affecting dnsjava:dnsjava package, versions [,3.6.0)
Threat Intelligence
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 ID SNYK-JAVA-DNSJAVA-7547403
- published 23 Jul 2024
- disclosed 22 Jul 2024
- credit Thomas Bellebaum
Introduced: 22 Jul 2024
CVE-2024-25638 Open this link in a new tabHow to fix?
Upgrade dnsjava:dnsjava
to version 3.6.0 or higher.
Overview
Affected versions of this package are vulnerable to Acceptance of Extraneous Untrusted Data With Trusted Data due to missing authentication in DNS responses. An attacker can manipulate DNS records and redirect network traffic or intercept sensitive information by injecting or altering DNS records from different zones in the communication channel.
Note:
This is only exploitable if the application utilizing DNSSEC does not implement additional checks on the relevance of DNS records to the original query.
Workaround
Users that are not able to upgrade to the fixed version can mitigate it by applying the following recommendations:
When using a ValidatingResolver, ignore any Server indications of whether or not data was available (e.g. NXDOMAIN, NODATA);
For APIs returning RRs from DNS responses, filter the RRs using an algorithm such as the one above. This includes e.g.
LookupSession.lookupAsync
;Remove APIs dealing with raw DNS messages from the examples section or place a noticeable warning above.