Cyber Security News

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 is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Recent Posts

AI-Assisted Hackers Compromise Government Linux Servers to Deploy Backdoors and Steal Credentials

Hackers used AI-assisted scripts to compromise government Linux servers, harvest administrator credentials, and establish persistent…

20 minutes ago

Researchers Demonstrate iOS 27.0.1 Untethered Jailbreak on iPhone 18 Pro

Security researchers from Calif (Calif.io) demonstrated a working untethered jailbreak on iOS 27.0.1 running on…

15 hours ago

Progress Warns of MOVEit Transfer Vulnerabilities Allowing Authentication Bypass and Privilege Escalation

Progress Software has released fixes for 12 vulnerabilities in MOVEit Transfer, its managed file transfer…

15 hours ago

MITRE ATT&CK v20 Adds New AI Attack Techniques for Prompt Injection and Data Theft

MITRE released ATT&CK v20 on October 13, 2026. It adds the first Enterprise techniques for…

16 hours ago

Google Chrome 155 Patches Critical Use-After-Free Flaw and Nine Additional Security Bugs

Google has released Chrome 155 to the Stable channel with 10 security fixes. One is…

17 hours ago

BAE Systems Cybersecurity Incident Disrupts Bankruptcy Court Operations Across the U.S.

A cybersecurity incident at defense contractor BAE Systems has taken offline the systems that send…

18 hours ago