
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
JavaScript TLS 1.3/1.2 implementation for Node.js, with full control over cryptographic keys and record layer
🍋 Pure JavaScript implementation of TLS for Node.js, exposing cryptographic keys and record-layer control for implementing advanced protocols.
⚠️ Project status: Active development.
APIs may change without notice until we reach v1.0.
Use at your own risk and please report issues!
npm i lemon-tls
import net from 'node:net';
import fs from 'node:fs';
import tls from 'lemon-tls';
// Example: TLS server over TCP
var server = net.createServer(function(tcp){
var socket = new tls.TLSSocket(tcp, {
isServer: true,
minVersion: 'TLSv1.2',
maxVersion: 'TLSv1.3',
ALPNProtocols: ['http/1.1'],
SNICallback: function (servername, cb) {
console.log('get cert for: '+servername);
cb(null, tls.createSecureContext({
key: fs.readFileSync('YOUR_CERT_PEM_FILE_PATH'),
cert: fs.readFileSync('YOUR_KEY_PEM_FILE_PATH')
}));
}
});
socket.on('secureConnect', function(){
console.log('[SRV] secure handshake established');
socket.write(new TextEncoder().encode('hi'));
});
socket.on('data', function(c){
// echo
socket.write(c);
});
socket.on('error', function(e){ console.error('[SRV TLS ERROR]', e); });
socket.on('close', function(){ console.log('[SRV] closed'); });
});
server.listen(8443, function(){ console.log('[SRV] listening 8443'); });
TLSSessionTLSSession is the core state machine for a TLS connection. its exposes low-level cryptographic material:
TLSSocketTLSSocket is a high-level wrapper designed to be API-compatible with Node.js tls.TLSSocket.
The main difference is that it uses a TLSSession from LemonTLS under the hood. This allows you to:
secureConnect, data, end, etc.).TLSSession if needed.The following roadmap reflects the current and planned status of the LemonTLS project.
✅ = Completed 🔄 = In progress ⏳ = Planned ❌ = Not planned
| Status | Item |
|---|---|
| ✅ | TLS 1.3 - Server mode |
| ✅ | X.509 certificate parsing (basic) |
| Status | Item | Notes |
|---|---|---|
| 🔄 | TLS 1.3 - Client mode | |
| 🔄 | TLS 1.2 - Server mode | |
| 🔄 | TLS 1.2 - Client mode | |
| 🔄 | Session tickets & resumption | |
| 🔄 | ALPN & SNI extensions | API design ongoing |
| 🔄 | API alignment with Node.js tls.TLSSocket | Migration tests in progress |
| 🔄 | Modularization of key schedule & record layer | For reuse in QUIC/DTLS |
| Status | Item | Notes |
|---|---|---|
| ⏳ | DTLS support | Datagram TLS 1.2/1.3 |
| ⏳ | Full certificate chain validation | Including revocation checks |
| ⏳ | Browser compatibility | Via WebCrypto integration |
| ⏳ | End-to-end interoperability tests | Against OpenSSL, rustls |
| ⏳ | Benchmarks & performance tuning | Resource usage, throughput |
| ⏳ | Fuzz testing & robustness checks | To improve security |
| ⏳ | Developer documentation & API reference | For easier onboarding |
| ⏳ | TypeScript typings | Type safety and IDE integration |
Note: LemonTLS is an active work-in-progress project aiming to provide a fully auditable, pure JavaScript TLS implementation for Node.js and beyond.
Please ⭐ star the repo to follow progress!
Pull requests are welcome!
Please open an issue before submitting major changes.
This project is part of the colocohen Node.js infrastructure stack (QUIC, WebRTC, DNSSEC, TLS, and more).
You can support ongoing development via GitHub Sponsors.
Apache License 2.0
Copyright © 2025 colocohen
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
FAQs
JavaScript TLS 1.3/1.2 implementation for Node.js, with full control over cryptographic keys and record layer
The npm package lemon-tls receives a total of 2 weekly downloads. As such, lemon-tls popularity was classified as not popular.
We found that lemon-tls 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.