T03 · Remote Payload Retrieval and Execution
- Location
tools/acquire/js_bridge.py:57- Finding
Remote Source Definitions Can Execute Unrestricted Node.js Code
- Content
View full analysis
"): body = sel[4:] if sel.startswith("") else sel[len("@js:"):] if body.endswith(""): body = body[:-5] if _JS_BRIDGE is not None: try: res = _JS_BRIDGE.eval( body.strip(), result=_to_result(context), variables=getattr(_JS_BRIDGE, "variables", None), headers=getattr(_JS_BRIDGE, "headers", None), ) return [res] ``` Request-level JavaScript hooks are also evaluated: ```python # tools/acquire/url_option.py:164-180 def apply_js(self, js_bridge): """Execute option js/bodyJs with the URL or body supplied as result.""" if not js_bridge: return self o = self._clone() if self.js: try: o.url = js_bridge.eval(self.js, variables={"result": self.url}) except Exception: ...[truncated 4191 chars]- Remediation
View remediation
