Buffer Overflow Affecting validator package, versions <5.0.0



    Attack Complexity Low

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 npm:validator:20160218
  • published 18 Feb 2018
  • disclosed 18 Feb 2016
  • credit Guillaume Leclerc

How to fix?

Upgrade validator to version 5.0.0 or higher.


validator is a library of string validators and sanitizers.

Affected versions of this package are vulnerable to Buffer Overflow. It used a regular expression (/^(?:[A-Z0-9+\/]{4})*(?:[A-Z0-9+\/]{2}==|[A-Z0-9+\/]{3}=|[A-Z0-9+\/]{4})$/i) in order to validate Base64 strings.