@immobiliarelabs/backstage-plugin-ldap-auth-backend@3.0.2
Malicious code in @immobiliarelabs/backstage-plugin-ldap-auth-backend (npm)
Analysis
The package is a trojanized version of the legitimate @immobiliarelabs/backstage-plugin-ldap-auth-backend. It ships two malicious files at the package root that were injected into the tarball: (1) binding.gyp — a Node.js native addon build file containing a GYP shell directive `<!(node index.js > /dev/null 2>&1 && echo stub.c)` that executes the second file during npm install via node-gyp rebuild, which npm triggers automatically when binding.gyp is present; and (2) index.js (5.2MB) — a heavily obfuscated script containing a large encoded array decoded through a Caesar-cipher/Rot transform and passed to eval() for execution. The legitimate package.json declares "files":["dist"] which would normally exclude these files — their presence in the tarball indicates tarball-level injection after the legitimate pack process. The clean entry point (dist/index.cjs.js) is untouched and contains the real Backstage LDAP auth plugin code. The attack uses binding.gyp as a stealth execution trigger to avoid lifecycle-hook-based detection, running the obfuscated payload during the install phase.
- analyzed by
- Leitwacht
- first seen
- Jun 26, 2026, 03:22 PM
- analyzed
- Jun 26, 2026, 03:26 PM
- weekly installs
- 651
Related advisories
- @immobiliarelabs/backstage-plugin-ldap-auth-backend@1.1.3 same package
- @immobiliarelabs/backstage-plugin-gitlab@2.1.2
- @immobiliarelabs/backstage-plugin-gitlab-backend@3.0.3
- @immobiliarelabs/backstage-plugin-gitlab@1.0.1
- @quantum-ai/gemini-cli@0.45.1
- @diezyyasha/libsignal-node@2.2.8
- native-hello-plugin@1.2.0
- free-anthropic-claude@5.3.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.