Saturday, October 17, 2026

InvisibleJS: Executable ES Modules Hidden in Plain Sight with Zero-Width Characters

A new experimental tool calledĀ InvisibleJSĀ has emerged on GitHub, demonstrating how JavaScript source code can be completely hidden from human view while remaining fully executable.

Created by developer oscarmine, this proof-of-concept obfuscation technique leverages zero-width Unicode characters to encode executable payloads that appear as blank files to the naked eye.

How InvisibleJS Works

InvisibleJS employs steganographic techniques to transform JavaScript code into invisible characters.

The tool converts source code into 8-bit binary strings, then maps each bit to a zero-width Unicode character specifically, Zero Width Space (U+200B) for zeros and Zero Width Non-Joiner (U+200C) for ones.

The resulting output appears empty but contains a bootstrap loader that decodes and executes the hidden code at runtime.

The repository offers two distinct versions tailored for different JavaScript environments:

Version 1 (Classic eval) targets CommonJS and traditional scripts, using synchronous eval() execution. This version naturally handles Node.js variables like require, __dirname, and module. exports, making it compatible with older environments and legacy browsers.

Version 2 (Modern import)Ā supports ES Modules and modern applications through dynamicĀ await import()Ā with data URI schemes. This version enables top-level import statements, export keywords, and top-level await functionality, though it requires ES Module support.

FeatureVersion 1 (eval)Version 2 (import)
Invisibility100%100%
CommonJS SupportNativeLimited
ESM SupportNoFull Support
Top-Level AwaitNoYes
Execution MethodSynchronousAsynchronous
Decoder LengthShortLong

The technique presents significant security concerns. Files encoded with InvisibleJS can bypass visual code inspection, potentially concealing malicious payloads in what appear to be empty files.

The dramatic file-size expansion, approximately 24 times the original, due to UTF-8 encoding, is one potential detection indicator.

Security researchers warn that while InvisibleJS demonstrates clever steganographic encoding, such techniques could be weaponized for code-injection attacks, supply-chain compromises, or to bypass security reviews that rely on manual code inspection.

Both versions utilize identical command-line interfaces for encoding JavaScript files.

The tool is publicly available on GitHub under the oscarmine repository, where it has been published as an educational demonstration of code obfuscation capabilities.

Organizations are advised to implement automated code analysis tools and security scanners that can detect zero-width character encoding schemes to defend against potential misuse of such techniques.

Follow us on Google News, LinkedIn, and X to Get Instant Updates and Set GBH as a Preferred Source in Google.

Divya
Divya
Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Hot this week

How To Access Dark Web Anonymously and know its Secretive and Mysterious Activities

What is Deep Web The deep web, invisible web, or...

How to Build and Run a Security Operations Center (SOC Guide) – 2023

Today’s Cyber security operations center (CSOC) should have everything...

Russian Hackers Bypass EDR to Deliver a Weaponized TeamViewer Component

TeamViewer's popularity and remote access capabilities make it an...

Web Server Penetration Testing Checklist – 2026

Web server pentesting is performed under three significant categories:Ā identity,...

ATM Penetration Testing – Advanced Testing Methods to Find The Vulnerabilities

ATM Penetration testing, Hackers have found different approaches to...

Researchers Demonstrate iOS 27.0.1 Untethered Jailbreak on iPhone 18 Pro

Security researchers from Calif (Calif.io) demonstrated a working untethered...

Google Android Flags 5 Million Suspected Scam Calls and Texts Monthly

Google says its Android scam-detection capabilities now flag more...

Researchers Uncover 20,000 Malicious Cloudflare Pages Domains Used in Tech Support Scams

More than 20,000 malicious Cloudflare Pages subdomains used by...

Hackers Exploit BeyondTrust Zero-Day and Erase Security Logs to Hide Their Tracks

A suspected China-nexus espionage group exploited a critical zero-day...

Related Articles

Recent News