MAL-2026-6848

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/log-format-thread/MAL-2026-6848.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-6848
Aliases
  • GHSA-fw7h-6mmw-4jjr
Published
2026-07-06T18:53:55Z
Modified
2026-07-09T22:17:02Z
Summary
Malicious code in log-format-thread (npm)
Details

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

Source: amazon-inspector (6e034e855661cc792a14908c613b0d3ae31917a99927ddf0db29b1ae173df0cd)

Package advertises itself as a log formatter but exposes an undocumented threadContent option on createLogger() that is forwarded to a worker thread which compiles and executes it via new Function('require', payload)(require) (src/worker.js lines 5-7, triggered from src/index.js lines 148-151). The eval only runs against a payload the caller explicitly supplies, so installing or requiring the package does not by itself execute attacker-controlled code, and there are no install hooks, no remote fetches, no credential reads, and no outbound exfiltration. However, the feature is undocumented in the README, is shaped like a backdoor primitive rather than logging functionality, and the package also pulls in axios and request despite the README claiming 'Zero dependencies'. Consumers who pass user-controlled or otherwise untrusted data into threadContent would expose their application to arbitrary code execution. Routing to human review so a maintainer can decide whether to publish a public advisory about the undocumented eval surface and the dependency mismatch.

Source: ghsa-malware (336e8b05b5d99a33aed734a8bc6940554d865ad279346612362782f4cded5ff3)

Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

Database specific
{
    "malicious-packages-origins": [
        {
            "id": "GHSA-fw7h-6mmw-4jjr",
            "import_time": "2026-07-06T19:53:47.955207246Z",
            "modified_time": "2026-07-06T18:53:56Z",
            "sha256": "336e8b05b5d99a33aed734a8bc6940554d865ad279346612362782f4cded5ff3",
            "source": "ghsa-malware",
            "versions": [
                "1.0.1",
                "1.0.0"
            ]
        },
        {
            "id": "IN-MAL-2026-008902",
            "import_time": "2026-07-08T22:51:33.516265798Z",
            "modified_time": "2026-07-08T22:49:53Z",
            "sha256": "778c35bb8086ee3d81fc8c882aa7e47144695564bc017c2fc71022695b47601d",
            "source": "amazon-inspector",
            "versions": [
                "1.0.0"
            ]
        },
        {
            "id": "IN-MAL-2026-009425",
            "import_time": "2026-07-09T22:02:30.249430261Z",
            "modified_time": "2026-07-09T21:54:05Z",
            "sha256": "6e034e855661cc792a14908c613b0d3ae31917a99927ddf0db29b1ae173df0cd",
            "source": "amazon-inspector",
            "versions": [
                "1.0.1"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / log-format-thread

Package

Name
log-format-thread
View open source insights on deps.dev
Purl
pkg:npm/log-format-thread

Affected ranges

Affected versions

1.*
1.0.0
1.0.1

Database specific

cwes
[
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    },
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    },
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    }
]
indicators
{
    "evidence_files": [
        {
            "path": "src/worker.js",
            "sha256": "029b0550c0406f39dcc08b78edcd5bc1ca91ab66595593210b811e480ebb1d54",
            "tlsh": "ccf0ebcb9c6820259eb63752abb37515f503a17322c183b5b79c21b00f72bc05033fa8"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/log-format-thread/MAL-2026-6848.json"