
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
This module gives you access to GpgMe librairy and its underlying GPG backend. With this module, you can :
This module is aiming at (finally!) give access to gpg key manipulation for node user respecting a couple of JS good practices like:
npm install node-gyp -g
apt-get install libgpgme11 libgpgme11-dev
brew install gpgme
Simply run npm install node-gpgme
. Make sure you have the requirements installed correctly.
The configuration objects allows you to specify the path of the keyring to use, if armored is to be used and the backend engine you want to use (so far, we only support OpenPGP).
var GpgMe = require('gpgme')
var gpgme = new GpgMe({armored: true, keyring_path: '/tmp'});
So far, you can only add a key (public or secret) and list those keys. Simple.
var s = "-----BEGIN PGP PUBLIC KEY BLOCK ..."
var fingerprint = gpgme.importKey(s)
if (fingerprint === false) {
console.log("Couldn't import key.")
} else {
console.log("Key fingerprint :" + fingerprint);
}
var keys = gpgme.listKeys();
console.log(keys[0]);
{ fingerprint: '3B2302E57CC7AA3D8D4600E89DAC32BD82A1C9DC',
email: 'sebastien@requiem.fr',
name: 'Sebastien Requiem',
revoked: false,
expired: false,
disabled: false,
invalid: false,
can_encrypt: true,
secret: false }
You can cipher a message to one recipient at a time for the moment bu using the fingerprint of the key previously retrieved.
var fingerprint = '3B2302E57CC7AA3D8D4600E89DAC32BD82A1C9DC';
var message = "Can you read this ?";
var cipher = gpgme.cipher(fingerprint, message);
-----BEGIN PGP MESSAGE-----
Version: GnuPG v2
hQEMA7xBZ+vX1VJHAQf/QpzEn8jwgWcuEgP/kF+NoihSOz5PDQbrf52EgykSajF4
XipaoqnceMrZpwkWTF9yZGcvCyMAX0pgiKNlThHloHsLkTjjq3L6/KFWk0odpG+C
UMer5X6yQsIjLsYGcWU2W8Qb6x4giX/v/yL4DGy6TYRb9tKf4r+0i2BD/1PrB2eN
qXhz6RFmbZg4qWjozyg2CYo5Bz2HDmF/mciRnejP/THCGKKmbf45LAZsS37Y07d6
cb35+YG0anwU/qZHDnrDsqlHTQ7+rdJui6KXobJpikAa873mziaqunDykl7Fve3l
26SzxiWhvgxk2+mhIW+syobFalLZCI40+ryAHvumhNJDATMw3MfGeZnBnRYZu+Ay
9EXXFCVn9A86Gli2B5gyYVk8kbAadfXAd8Vj+ysPw0in/HGoUH/NTDUp/C/SN4Nl
L4KxYQ==
=ACDC
-----END PGP MESSAGE-----
So far, this module not respecting the nature of node when fetching keys or encrypting large payload. If you have 1000 keys in your keyring, except things to block long enough to be noticed. Same goes for large messages to cipher.
As this is a very early release coded in few days only, I tried my best to deallocate memory blocks when possible but expect this module to leak for now.
FAQs
GpgMe bindings
The npm package node-gpgme receives a total of 0 weekly downloads. As such, node-gpgme popularity was classified as not popular.
We found that node-gpgme 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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.