
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).
fastify-hl7
Advanced tools
A Fastify Hl7 Plugin Developed in Pure TypeScript. It uses the node-hl7-client and node-hl7-server plugin as a wrapper.
The build exports this to valid ESM and CJS for ease of cross-compatibility.
If you are using this NPM package, please consider giving it a :star: star. This will increase its visibility and solicit more contribution from the outside.
This documentation is how to use this plugin, not on how to use the libraries above. Head here if you need help with those.
npm install fastify-hl7
Register this as a plugin.
await fastify.register(fastifyHL7);
const listener = fastify.hl7.createInbound(
"ib_adt",
{ port: 3001 },
async (req, res) => {
const messageReq = req.getMessage();
const messageType = req.getType();
// your logic here
await res.sendResponse("AA");
},
);
This will create a inbound connection. You can optionally return it to a variable to attach advanced listeners.
import fastify from "fastify";
fastify.hl7.createClient("localhost", { host: "0.0.0.0" });
This will create a "client" class that will then allow you to attach different outbound connections.
The name localhost
in a unique identifier to this host, so it can be used to attach different outbound connections to this server/broker.
There might be times when your HL7 messages need to cross-over to different hosts/server/inbound endpoints and this is how you would get them.
Within your code now you can use the fastify context and access the hl7
decorator,
and create an outbound connection.
const client = fastify.hl7.createConnection(
"ob_adt",
{ port: 3001 },
async (res) => {
const messageRes = res.getMessage();
// Your code here. Either a failure or a success, but still do your work here.
},
);
// building a HL7 Message Segment
const message = app.hl7.buildMessage({
messageHeader: {
msh_9_1: "ADT",
msh_9_2: "A01",
msh_11_1: "D",
},
});
await client.sendMessage(message);
enableServer
If this is not set, enableServer will be set to true
. You need to set this to false
will turn off the server capabilities.
serverOptions
Set this using the options from the node-hl7-serer library ServerOptions values to override server creation. This could be enabling IPv4 or IPv6 and other server options including TLS. Since you cannot set this after run time, it has to be set during registration.
Please review the libraries for more complete documentation.
Licensed under MIT.
v3.3.0 - 2025-03-25
Full Changelog: https://github.com/Bugs5382/fastify-hl7/compare/v3.2.0...v3.3.0
FAQs
A Fastify HL7 Plugin Developed in Pure TypeScript.
The npm package fastify-hl7 receives a total of 6 weekly downloads. As such, fastify-hl7 popularity was classified as not popular.
We found that fastify-hl7 demonstrated a healthy version release cadence and project activity because the last version was released less than 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.