{"id":"MAL-2025-4843","summary":"Malicious code in libffi-dev (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: ghsa-malware (570b28ff882e484be3a59b834348694d7d3f5ec0f6e5aa712640fb0336ec6a88)\nAny 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.\n\nThis advisory concerns a malicious npm package named `libffi-dev`. It is not related to the upstream [C library](sourceware.org/libffi) `libffi` nor distro development packages named `libffi-dev` shipped by Debian, Ubuntu, Alpine, etc.\n","aliases":["GHSA-2p54-33x3-2mcf","SNYK-JS-LIBFFIDEV-10338516"],"modified":"2026-03-02T22:31:57.378594Z","published":"2025-06-10T03:07:47Z","database_specific":{"malicious-packages-origins":[{"sha256":"8a906bee35ae351e1925f8e50b6060ecae77896f7f3ceb459f1218bfa3df15fc","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"import_time":"2025-06-11T00:37:35.594764782Z","id":"GHSA-2p54-33x3-2mcf","modified_time":"2025-06-10T03:07:47Z","source":"ghsa-malware"},{"sha256":"24526fbf539d4c1c75fd80d2858984316a86e5b5a5a3d51db5185639e6dbe463","import_time":"2025-06-18T15:06:25.943961488Z","id":"RLMA-2025-03297","modified_time":"2025-06-18T10:32:52Z","source":"reversing-labs","versions":["1.0.0"]},{"sha256":"214a71dbf223c356b8305beaea8aff72606ac373a1459ca4388482ff6bc07139","import_time":"2025-08-01T10:41:38.750236245Z","id":"RLUA-2025-03903","modified_time":"2025-07-31T19:33:43Z","source":"reversing-labs"},{"sha256":"570b28ff882e484be3a59b834348694d7d3f5ec0f6e5aa712640fb0336ec6a88","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"import_time":"2026-03-02T22:24:27.690538113Z","id":"GHSA-2p54-33x3-2mcf","modified_time":"2026-03-02T22:12:48Z","source":"ghsa-malware"}]},"references":[{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-2p54-33x3-2mcf"},{"type":"PACKAGE","url":"https://npmjs.com/package/libffi-dev"},{"type":"ADVISORY","url":"https://security.snyk.io/vuln/SNYK-JS-LIBFFIDEV-10338516"}],"affected":[{"package":{"name":"libffi-dev","ecosystem":"npm","purl":"pkg:npm/libffi-dev"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.0.0"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/libffi-dev/MAL-2025-4843.json"}}],"schema_version":"1.7.3","credits":[{"name":"ReversingLabs","contact":["https://www.reversinglabs.com"],"type":"FINDER"}]}