The cookie-parser-legacy npm package impersonates the legitimate cookie-parser middleware but includes malicious code. It replaces a critical dependency with a malicious package pinned to a mutable 'latest' tag, allowing arbitrary code execution during installation. The package imports child_process execSync without legitimate use, indicating potential for executing arbitrary commands. Systems with this package installed should be considered fully compromised, and all secrets should be rotated. Removal of the package may not fully remediate the compromise.