Skip to content

Instantly share code, notes, and snippets.

@oshinko
Last active March 21, 2026 03:57
Show Gist options
  • Select an option

  • Save oshinko/9454bf9fd0fbd0d2a85d4ffd975c45f4 to your computer and use it in GitHub Desktop.

Select an option

Save oshinko/9454bf9fd0fbd0d2a85d4ffd975c45f4 to your computer and use it in GitHub Desktop.
GlassWorm Demo
// https://www.aikido.dev/blog/glassworm-returns-unicode-attack-github-npm-vscode
const s = v => [...v].map(w => (
w = w.codePointAt(0),
0xFE00 <= w && w <= 0xFE0F ? w - 0xFE00 :
0xE0100 <= w && w <= 0xE01EF ? w - 0xE0100 + 16 : null
)).filter(n => n !== null);
const d = v => typeof Buffer !== 'undefined' ?
Buffer.from(s(v)).toString('utf-8') :
new TextDecoder().decode(Uint8Array.from(s(v)));
const maliciousScript = d(`󠅓󠅟󠅞󠅣󠅟󠅜󠅕󠄞󠅜󠅟󠅗󠄘󠄒󠄸󠅕󠅜󠅜󠅟󠄜󠄐󠅇󠅟󠅢󠅜󠅔󠄑󠄒󠄙`);
console.log(maliciousScript);
// eval(maliciousScript);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment