
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).
A lightweight vanillaJs script to connect server-rendered static HTML to client-rendered application
A lightweight vanillaJs script to connect server-rendered static HTML to client-rendered application
install the package using npm
npm install coldboot
load the coldboot.js script in your page
<script async src="/node_modules/coldboot/dist/coldboot.min.js" onload="coldboot.init()" type="text/javascript"></script>
we expose coldboot
on window which has 2 methods init & complete.
coldboot.init
needs to be called to start listening to user events, and takes 2 parameters customLoaderId,customTextContainerId
these ids determine the element to show and the element where loader text is to be injected.
in markup , we can now add attributes cb-await='loader text'
& cb-await-id='loaderId'
to add a loader with custom text, the id provided in cb-await-id
is provided to the client application so that it can perform relevant actions.
add the attribute cb-persist='uniqueIdentifier'
to add a listener that will listen to 'input' events & store the value property of the element.
once client application is finished loading, it must call coldboot.complete()
.
doing this wil detach event listeners, hide the loader, update values for client rendered cb-persist
based on their unique identifiers.
coldboot.complete()
will also return an object with the map of all persisted-identifier to value in the preserve
key & the id provided in cb-await-id
in the awaitId
key to indicate which element was clicked.
if an interaction is observed, then the object will have the following form
{
awaitId:'submit',
preserve: { email:'donjoe@example.com'}
}
if no interaction is observed, then the object returned would be
{
awaitId : undefined,
preserve: {}
}
Optionally you can also subscribe to coldboot.onComplete().then(fn)
if you want to listen to complete on multiple places. When a valid element is present, it resolves with value -
{
awaitId:'submit',
preserve: { email:'donjoe@example.com'}
}
coldboot.onComplete is resolved after coldboot.complete() is called.
FAQs
A lightweight vanillaJs script to connect server-rendered static HTML to client-rendered application
The npm package coldboot receives a total of 1 weekly downloads. As such, coldboot popularity was classified as not popular.
We found that coldboot 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.