Rapid7 Vulnerability & Exploit Database

JavaScript Memory Leaks - Accidental global variable

Free InsightVM Trial No Credit Card Necessary
2024 Attack Intel Report Latest research by Rapid7 Labs
Back to Search

JavaScript Memory Leaks - Accidental global variable

Severity
4
CVSS
(AV:N/AC:L/Au:M/C:P/I:N/A:N)
Published
01/01/2017
Created
07/25/2018
Added
06/27/2018
Modified
06/27/2018

Description

Global variables are easily leaked in Javascript. You may consider the following javascript code used in the default, non-strict mode:

      function f(){       Token = 1;      }      f();      console.log("I can still see Token: " + Token);      
]]> The default, non-strict mode allows some relatively "unsafe" actions to be taken, and it allows some code mistakes that make it difficult for JavaScript engines to perform optimizations.

Solution(s)

  • javascriptcheck-javascriptleaks-r01

With Rapid7 live dashboards, I have a clear view of all the assets on my network, which ones can be exploited, and what I need to do in order to reduce the risk in my environment in real-time. No other tool gives us that kind of value and insight.

– Scott Cheney, Manager of Information Security, Sierra View Medical Center

;