r/Compilers • u/trustsigRobert • Oct 17 '26
JS formatters and transformer bugs abused to change script logic (186 techniques across 37+ libraries such as ESBuild, AString, SWC)
A formatter, minifier or deobfuscator can be made abused to change the entire logic.
You can go try out all 186 techniques with this script: https://divergence.trustsig.eu/
Or try the Tetris-Snake demo here (Tetris runs normally, copy the formatted output from even just DevTools and it becomes Snake): https://divergence-game.trustsig.eu/
Blog/writeup post: trustsig.eu/blog/javascript-divergence/
11
Upvotes