{"id":"MAL-2026-15907","summary":"Malicious code in tiny-folder-tree (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (fb7707665659f287294c31f37c4eff9ceba537e9b54859837615929c296a9540)\ntiny-folder-tree@0.1.0 declares a postinstall script (src/build.js) that runs on `npm install`. The script performs a DNS TXT lookup for spreadsheets-documents.com and, when the first character of the first TXT record is '1', invokes src/tools.js which issues an HTTPS request to a URL reconstructed at runtime from obfuscated numeric constants in src/const.js (base-77/base-45 encoded strings decoding to 'https' and an 'HTTPS://...' URL). The response's 'm' header is passed directly to child_process.execSync, yielding arbitrary attacker-controlled shell execution on the installer's machine. The require target for the HTTPS module and the destination URL are both reconstructed via helpers (normalize_hash / normalize_hash_map) to evade static analysis. An author-username bypass ('justin') skips execution on the author's own host, confirming the code is intended to fire on other installers rather than the maintainer.\n","modified":"2026-09-04T04:30:06.563347323Z","published":"2026-09-04T03:45:10Z","database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","versions":["0.1.0"],"id":"IN-MAL-2026-019448","import_time":"2026-09-04T04:21:20.703137761Z","modified_time":"2026-09-04T03:45:10Z","sha256":"fb7707665659f287294c31f37c4eff9ceba537e9b54859837615929c296a9540"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/tiny-folder-tree/v/0.1.0"}],"affected":[{"package":{"name":"tiny-folder-tree","ecosystem":"npm","purl":"pkg:npm/tiny-folder-tree"},"versions":["0.1.0"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"package_integrity":[{"filename":"tiny-folder-tree-0.1.0.tgz","hashes":{"sha1":"1e5d8dc052cf6d78d4f4f90df2035f5643c75391","sha512_sri":"sha512-N9d+LpQzybtTrMrATInSERRJGTwykFKKCTQLTtvoMJglCPXwPkCnCFz9ZWomWvyk0Oheg2Tyuv3RLyRStymymA=="}}],"evidence_files":[{"path":"src/build.js","sha256":"264dca0cb6b4b00092f0032d2a5be38f9e0be47440c62c81b21be54aaeb42292","tlsh":"acf0553ac52a560a03e31b9ca178c85acab2f132238140553b5c6706bff3a601322d2a"},{"path":"src/const.js","sha256":"48db2a2dd6cd26cf592013a6d944cf7d23b629b9b957cd1a422661fefee2dacf","tlsh":"27012ac195dd385316f713e2f2e644c5edfa036552097189bc6885ad0f055d88193ff5"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/tiny-folder-tree/MAL-2026-15907.json"}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}