Many browser based vulnerabilities are using JavaScript. You can disable the usage of JavaScript, but this will have effects on your browsing experience, because more and more websites use JavaScript and will not work like expected, when you disable it.
How to fix it
macOS 10.11 – 14
- Open Safari > “Preferences” > “Security”
- Deselect “Enable JavaScript”

