Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
CSRF crumb generation and validation for hapi
Lead Maintainer: Marcus Stong
Crumb has been refactored to securely work with CORS, as OWASP recommends using CSRF protection with CORS.
The allowOrigins
option allows you to have fine grained control on which Cross Origin sites get the Crumb cookie set. This is useful for APIs that have some consumers only using GET routes (no Crumb token should be set) while other consumers have permission for POST/PUT/PATCH/DELETE routes.
If the allowOrigins
setting is not set, the server's cors.origin
list will be used to determine when to set the Crumb cookie on Cross Origin requests.
To use Crumb securely on a server that allows Same Origin requests and CORS, it's a requirement to set server host
to a hostname rather than an IP for Crumb to determine same origin requests. If you use an IP as the server host, your Same Origin requests will not get the Crumb cookie set.
Note that Crumb will not work with allowOrigins
or cors.origin
set to "*"
The following options are available when registering the plugin
function (request, reply) {}
, which when provided, is called for every request. If the provided function returns true, validation and generation of crumb is skipped (defaults to false)cors.origin
setting by defaultAdditionally, some configuration can be passed on a per-route basis
FAQs
CSRF crumb generation and validation plugin
The npm package crumb receives a total of 232 weekly downloads. As such, crumb popularity was classified as not popular.
We found that crumb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.