commons-validator:commons-validator@1.2.0

  • latest version

    1.11.0

  • latest non vulnerable version

  • first published

    20 years ago

  • latest version published

    2 months ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the commons-validator:commons-validator package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Uncaught Exception

    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.

    How to fix Uncaught Exception?

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

    [,1.3.1)