Rapid7 Vulnerability & Exploit Database

ua-parser-js npm module ReDoS

Back to Search

ua-parser-js npm module ReDoS



This module exploits a Regular Expression Denial of Service vulnerability in the npm module "ua-parser-js". Server-side applications that use "ua-parser-js" for parsing the browser user-agent string will be vulnerable if they call the "getOS" or "getResult" functions. This vulnerability was fixed as of version 0.7.16.


  • Ryan Knell, Sonatype Security Research
  • Nick Starke, Sonatype Security Research


Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use auxiliary/dos/http/ua_parser_js_redos
msf auxiliary(ua_parser_js_redos) > show actions
msf auxiliary(ua_parser_js_redos) > set ACTION < action-name >
msf auxiliary(ua_parser_js_redos) > show options
    ...show and set options...
msf auxiliary(ua_parser_js_redos) > run 

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security