Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
This is basically just node-jws augmented so that
secretOrKey
can be a JWK or set of JWKs.
$ npm install jws-jwk
var jws = require('jws-jwk');
var signature = getJWSFromSomwhere();
var jwk = { kid: '1234', kty: 'RSA', n: '12345...XYZ=', e: 'AQAB' };
if (jws.verify(signature, jwk)) {
// Do stuff here, signature was verified using the JWK
}
You might want to make it so when other code you are using does the following,
the module in the variable jws
is augmented.
var jws = require('jws');
One reason to do this is to make modules using node-jws work with JWKs, e.g. jsonwebtoken. Requiring node-jws-jwk like so will add its augmented functions to the node-jws module:
var jws = require('jws-jwk').shim();
This module shims in jsrsasign when browserified
to make jws.verify
work in-browser (with JWKs and normally).
FAQs
Adds (some) support for JWKs to node-jws
We found that jws-jwk 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.