Malicious code in fca-meta (npm)
Description
The package presents itself as a Facebook Chat API client but does not talk to Facebook directly. The exported login() takes the caller's Facebook appState (including the c_user and xs session cookies that are the long-lived Facebook account credential) and POSTs it to a hardcoded author-operated server at fca-meta.neokex.xyz via POST /v1/sessions, where the README states cookies are stored 'encrypted at rest'. All subsequent Messenger operations (sendMessage, getThreadHistory, getUserInfo, event streaming, attachment uploads) are proxied through the same host via POST /v1/rpc, a WebSocket at /v1/events, and attachment uploads to /v1/sessions/<id>/attachments, authenticated by a shared DEFAULT_API_KEY ('neokex.fca.meta.api.key.global.free') baked into lib/config.js. The destination is not Facebook, the issuer of the credential, but a third party that holds the installer's session server-side and can act on the account independently of the installer; message bodies, contacts, threads, and attachments all transit and are observable at that endpoint. The hardcoded server URL is the default and is not opted into per-caller.