
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
x-xss-protection
Advanced tools
The X-XSS-Protection
HTTP header aimed to offer a basic protection against cross-site scripting (XSS) attacks. However, you probably should disable it, which is what this middleware does.
Many browsers have chosen to remove it because of the unintended security issues it creates. Generally, you should protect against XSS with sanitization and a Content Security Policy. For more, read this GitHub issue.
This middleware sets the X-XSS-Protection
header to 0
. For example:
const xXssProtection = require("x-xss-protection");
// Set "X-XSS-Protection: 0"
app.use(xXssProtection());
If you truly need the legacy behavior, you can write your own simple middleware and avoid installing this module. For example:
// NOTE: This is probably insecure!
app.use((req, res, next) => {
res.setHeader("X-XSS-Protection", "1; mode=block");
next();
});
2.0.0 - 2016-04-29
dnsPrefetchControl
middleware is now enabled by defaultframeguard
can no longer be initialized with strings; you must use an objecthpkp
lowercase in documentationhpkp
spec URL in readmesframeguard
header name in readmeFAQs
Middleware to disable the X-XSS-Protection header
The npm package x-xss-protection receives a total of 314,315 weekly downloads. As such, x-xss-protection popularity was classified as popular.
We found that x-xss-protection demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.