
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).
framed-stream
Advanced tools
Read/write stream messages prefixed 8, 16, 24 or 32 bit length.
npm i framed-stream
We have a server that handles connections like so:
const FramedStream = require('framed-stream')
const net = require('net')
const server = net.createServer().listen(3000)
server.on('connection', function (socket) {
const stream = new FramedStream(socket)
stream.on('data', (message) => console.log('client says:', message.toString()))
stream.on('end', () => stream.end())
stream.on('close', (message) => console.log('server stream is closed'))
})
Client does the same, also for example it sends two messages:
const client = net.connect(3000)
const stream = new FramedStream(client)
stream.on('data', (message) => console.log('server says:', message.toString()))
stream.on('end', () => stream.end())
stream.on('close', () => console.log('client stream is closed'))
stream.write('hello')
stream.write('world')
stream.end()
const stream = new FramedStream(rawStream, [options])
Make a new framed stream.
Available options
:
{
bits: 32
}
You can only set bits
using the frameBits
values documented below.
stream.rawStream
The underlying raw stream.
stream.frameBits
Indicates the frame bits (8
, 16
, 24
, or 32
).
stream.frameBytes
Indicates the frame bytes (1
, 2
, 3
, or 4
).
stream.maxMessageLength
Indicates the max message length (255
, 65535
, 16777215
, or 4294967295
).
MIT
FAQs
Read/write stream messages prefixed 8, 16, 24 or 32 bit length
We found that framed-stream 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.