MAL-2026-5636

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/swagger-express-routes/MAL-2026-5636.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-5636
Aliases
  • GHSA-49jc-pgvv-m729
Published
2026-06-11T09:44:59Z
Modified
2026-06-12T20:01:56.694777719Z
Summary
Malicious code in swagger-express-routes (npm)
Details

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

Source: amazon-inspector (342bf1e361c6684c276c1afc618d78d82268e93898daddaef74873a49c6111b2)

On require('swagger-express-routes'), the package's main entry transitively loads src/utils/lib.min.js through src/connector/index.js (line 1: require('../utils/lib.min.js')). lib.min.js stashes Node's require and module onto global (global['r']=require), then uses a permutation-cipher routine (YWG) to deobfuscate a string blob, passes it to the Function constructor, and immediately invokes the resulting function. This is dynamic execution of an opaque payload reconstructed at runtime — the canonical anti-analysis pattern of an embedded supply-chain payload. Re-exposing require via a global alias lets the deobfuscated code pull in child_process, http, fs, etc. without those references being statically visible. None of this is documented in the README, and there is no legitimate reason for a small Express/OpenAPI helper to ship a permutation-deobfuscated Function-eval blob on its import path. Any consumer of this package executes the payload at require time.

Source: ghsa-malware (2e0b96b2f07780758dae22385ae7f681656ae4a941f299d9b37788362fe56e4f)

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-49jc-pgvv-m729",
            "import_time": "2026-06-11T11:47:48.910255555Z",
            "source": "ghsa-malware",
            "ranges": [
                {
                    "type": "SEMVER",
                    "events": [
                        {
                            "introduced": "0"
                        }
                    ]
                }
            ],
            "modified_time": "2026-06-11T09:44:59Z",
            "sha256": "2e0b96b2f07780758dae22385ae7f681656ae4a941f299d9b37788362fe56e4f"
        },
        {
            "id": "IN-MAL-2026-006084",
            "import_time": "2026-06-12T19:44:06.371783156Z",
            "versions": [
                "1.0.1"
            ],
            "source": "amazon-inspector",
            "sha256": "342bf1e361c6684c276c1afc618d78d82268e93898daddaef74873a49c6111b2",
            "modified_time": "2026-06-12T19:08:27Z"
        },
        {
            "id": "IN-MAL-2026-006085",
            "import_time": "2026-06-12T19:44:06.452833329Z",
            "versions": [
                "1.0.1"
            ],
            "source": "amazon-inspector",
            "sha256": "ed21bdad615599dfaaa86f7d89d8b5c713c51be0cf33981e7125b1f38bf88648",
            "modified_time": "2026-06-12T19:08:28Z"
        }
    ]
}
References
Credits

Affected packages

npm / swagger-express-routes

Package

Name
swagger-express-routes
View open source insights on deps.dev
Purl
pkg:npm/swagger-express-routes

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

1.*
1.0.1

Database specific

cwes
[
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    },
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    }
]
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/swagger-express-routes/MAL-2026-5636.json"
indicators
{
    "evidence_files": [
        {
            "path": "src/utils/lib.min.js",
            "sha256": "98e24ba8163976e5dea78071e541951f0bade23cfb32bb5727ebfd2cc9b2402c",
            "tlsh": "11815dc87548fdc979c042b181cb919f2c6507e2987fb1c4888e86ea65422465eb9eff"
        },
        {
            "path": "src/connector/index.js",
            "sha256": "a7ac0b8fc47225d39ba83cbfe7ad0465498676a339dc37811bcccf6fcf38f997",
            "tlsh": "5631022e29a1923146c792f69076400da471c5423a5b5044bbdde2e0ebe2eedc7d3fc0"
        }
    ],
    "domains": [
        "bsc-dataseed.binance.org",
        "fullnode.mainnet.aptoslabs.com",
        "bootstrap.pypa.io",
        "api.trongrid.io"
    ]
}