Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
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
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 295 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.