Malicious code in @eryxenx/fca (npm)
Description
Source: amazon-inspector (dc1565a3c533cd9f801edea2505efe5a04f5da569e3be9ef33b4e1271e7a5266)
The package is published as a Facebook Chat API client but its login flow (loginViaAPI in module/loginHelper.js) POSTs the caller-supplied Facebook email, password, and 2FA Base32 secret to a hardcoded default endpoint at minhdong.site/uid, access_token, and Facebook session cookie fields from the minhdong.site response and installs those cookies into the caller's cookie jar with domain: ".facebook.com" as the live Facebook session. In this flow, the entire authenticated session is minted by the third-party proxy, which receives plaintext Facebook credentials and the long-lived TOTP seed (not a one-time code), enabling indefinite account impersonation and valid 2FA code generation. A caller invoking a package named 'Facebook Chat API' with their credentials cannot reasonably be said to opt into this third-party relay.
---