Uncaught Exception Affecting commons-validator:commons-validator package, versions [,1.3.1)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

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 IDSNYK-JAVA-COMMONSVALIDATOR-21182664
  • published18 Oct 2026
  • disclosed27 Sept 2026
  • creditUnknown

Introduced: 27 Sep 2026

New CVE NOT AVAILABLE CWE-248  (opens in a new tab)

How to fix?

Upgrade commons-validator:commons-validator to version 1.3.1 or higher.

Overview

Affected versions of this package are vulnerable to Uncaught Exception in the isValidAuthority method of UrlValidator, which allocates new String[10] for the hostname labels and increments segmentCount once per dot separated label with no check against the array length. An attacker can terminate the request handling thread by submitting a URL whose hostname carries eleven or more labels, such as http://a.a.a.a.a.a.a.a.a.a.com/, so the assignment to domainSegment[10] throws and the exception propagates through isValid to the caller. This requires the application to pass input it does not control to UrlValidator.isValid or GenericValidator.isUrl without using a handler or catching unchecked exceptions, and the array is allocated only on the hostname branch, so an authority given as an IP literal never reaches it.

CVSS Base Scores

version 4.0
version 3.1