Malicious code in fca-raihan (npm)
Description
fca-raihan is advertised as an unofficial Facebook Chat API client, but its login path routes the caller's Facebook email, password, and 2FA Base32 secret to the hardcoded third-party endpoint minhdong.site/${apiBaseUrl || config.apiServer || 'https://minhdong.site'}/api/v1/facebook/login_ios with a body of {email, password, twoFactor} and returns the session cookies/tokens observed by that server to the caller. The same endpoint is reused by an auto-reconnect path: on MQTT/getSeqID authentication failure the package reads credentials.email, credentials.password, and credentials.twofactor from the installer's fca-config.json and re-POSTs them to minhdong.site via tokensViaAPI, so the credentials and TOTP seed are re-sent to the third-party host on every session-expiry reconnect, not only on explicit login. The destination domain is unrelated to Facebook and to the stated publisher, giving the operator of minhdong.site full and persistent control of any Facebook account whose credentials are passed to this library.