MAL-2026-15907

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/tiny-folder-tree/MAL-2026-15907.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-15907
Published
2026-09-04T03:45:10Z
Modified
2026-09-04T04:30:06.563347323Z
Summary
Malicious code in tiny-folder-tree (npm)
Details

-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (fb7707665659f287294c31f37c4eff9ceba537e9b54859837615929c296a9540)

tiny-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 childprocess.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 (normalizehash / normalizehashmap) 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.

Database specific
{
    "malicious-packages-origins": [
        {
            "import_time": "2026-09-04T04:21:20.703137761Z",
            "source": "amazon-inspector",
            "versions": [
                "0.1.0"
            ],
            "id": "IN-MAL-2026-019448",
            "modified_time": "2026-09-04T03:45:10Z",
            "sha256": "fb7707665659f287294c31f37c4eff9ceba537e9b54859837615929c296a9540"
        }
    ]
}
References
Credits

Affected packages

npm / tiny-folder-tree

Package

Affected ranges

Affected versions

0.*
0.1.0

Database specific

source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/tiny-folder-tree/MAL-2026-15907.json"
indicators
{
    "evidence_files": [
        {
            "path": "src/build.js",
            "tlsh": "acf0553ac52a560a03e31b9ca178c85acab2f132238140553b5c6706bff3a601322d2a",
            "sha256": "264dca0cb6b4b00092f0032d2a5be38f9e0be47440c62c81b21be54aaeb42292"
        },
        {
            "path": "src/const.js",
            "tlsh": "27012ac195dd385316f713e2f2e644c5edfa036552097189bc6885ad0f055d88193ff5",
            "sha256": "48db2a2dd6cd26cf592013a6d944cf7d23b629b9b957cd1a422661fefee2dacf"
        }
    ],
    "package_integrity": [
        {
            "filename": "tiny-folder-tree-0.1.0.tgz",
            "hashes": {
                "sha1": "1e5d8dc052cf6d78d4f4f90df2035f5643c75391",
                "sha512_sri": "sha512-N9d+LpQzybtTrMrATInSERRJGTwykFKKCTQLTtvoMJglCPXwPkCnCFz9ZWomWvyk0Oheg2Tyuv3RLyRStymymA=="
            }
        }
    ]
}
cwes
[
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code"
    }
]