{"id":"MAL-2026-6922","summary":"Malicious code in mcp-server-pg (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (22d68bdfced357622e33e4608bd35ded4d8988ea6dc7da073b3a83075978815d)\nOn `npm install`, scripts/postinstall.js unconditionally reads a range of installer-owned identity and configuration files and POSTs a JSON payload to a hardcoded endpoint at https://npm-package-logger-228835561205.europe-west1.run.app/. Collected data includes: OS hostname, OS username (and Windows DOMAIN\\user), current working directory and parent project package.json; ~/.gitconfig and the parent repo's.git/config plus.git/logs/HEAD (committer emails and recent-author list); ~/.ssh/*.pub comment fields (which typically encode the developer's email/identity); ~/.config/gh/hosts.yml (GitHub login and email); ~/.config/gcloud/properties (GCP account and project); ~/.aws/config (profile names); and /etc/resolv.conf. The file's header comment claims 'anonymous diagnostics' and that 'no credentials are transmitted', but the payload consists of direct personal and organizational identifiers usable to fingerprint the developer, correlate them across SCM/cloud accounts, and target follow-on attacks. The telemetry is opt-out via an environment variable (MCP_SERVER_PG_TELEMETRY_DISABLE), not opt-in, and fires automatically on install with no README disclosure of the fields collected or the destination. The self-labeling as diagnostics does not change the behavior: bulk harvest of SCM identity, SSH key identities, cloud project/account identifiers and hostname/username to an author-controlled endpoint at install time is exfiltration.\n\n## Source: ghsa-malware (7d7c8e9391621ff69fb62a9e247b738b4d20cfdfc4cccc44c2a86f17831f18f6)\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","aliases":["GHSA-cfv7-74pc-vmff"],"modified":"2026-07-09T16:31:58.527085477Z","published":"2026-07-07T13:59:38Z","database_specific":{"malicious-packages-origins":[{"source":"ghsa-malware","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"modified_time":"2026-07-07T13:59:45Z","import_time":"2026-07-07T15:15:50.703610675Z","sha256":"7d7c8e9391621ff69fb62a9e247b738b4d20cfdfc4cccc44c2a86f17831f18f6","id":"GHSA-cfv7-74pc-vmff"},{"source":"amazon-inspector","versions":["1.2.1"],"modified_time":"2026-07-08T20:35:44Z","import_time":"2026-07-08T21:27:50.029677974Z","sha256":"1384f3305e9a1608107ce7bf6b7511b2ac735737f84c3370ed3848e59a16c797","id":"IN-MAL-2026-008608"},{"source":"amazon-inspector","versions":["1.1.0"],"sha256":"67f4c45ff2a4d23995d214536da559aea89392d27ccb4bff7044f703da5e30a6","modified_time":"2026-07-09T15:35:05Z","import_time":"2026-07-09T16:20:45.416780094Z","id":"IN-MAL-2026-009146"},{"source":"amazon-inspector","versions":["1.2.2"],"import_time":"2026-07-09T16:20:46.232632174Z","modified_time":"2026-07-09T15:36:19Z","sha256":"d971ff36c542f172fa59da7c506c01e5783e72951da052a9fdf7cd88fb496cc1","id":"IN-MAL-2026-009155"},{"source":"amazon-inspector","versions":["1.1.1"],"modified_time":"2026-07-09T15:35:53Z","import_time":"2026-07-09T16:20:45.933676988Z","sha256":"dbc318e129e22bbc4982d376c68e27d5a3e55d361c297c59760fdbda652d7d08","id":"IN-MAL-2026-009152"},{"source":"amazon-inspector","versions":["0.7.0"],"modified_time":"2026-07-09T15:35:21Z","import_time":"2026-07-09T16:20:45.567104643Z","sha256":"88a75ecb6abae9be4ab802ab46dfc799fac95ec8dad82c47629a16fca1f1ae05","id":"IN-MAL-2026-009148"},{"source":"amazon-inspector","versions":["0.1.0"],"modified_time":"2026-07-09T15:37:50Z","import_time":"2026-07-09T16:20:47.269976928Z","sha256":"d448b7f7c3d04b9d776d88ab60cd2278cdee06c0614430230ef8ee960c8f59d1","id":"IN-MAL-2026-009165"},{"source":"amazon-inspector","versions":["0.2.1"],"sha256":"2bcb15aa5d85baa20e86ee75cd21521a021321f16bc46173cfe2be583347492c","modified_time":"2026-07-09T15:36:45Z","import_time":"2026-07-09T16:20:46.534055343Z","id":"IN-MAL-2026-009158"},{"source":"amazon-inspector","versions":["0.2.0"],"sha256":"3e39219a80107538250a1b8b1d4f3c07fd55f00cc1f23e1e1ed334dfb2f07da9","modified_time":"2026-07-09T15:35:14Z","import_time":"2026-07-09T16:20:45.497821516Z","id":"IN-MAL-2026-009147"},{"source":"amazon-inspector","versions":["0.6.0"],"modified_time":"2026-07-09T15:37:01Z","import_time":"2026-07-09T16:20:46.801858422Z","sha256":"860bbcc312a760011ad25a9c4aad91f638eb534796a9820fb63fc84626c0bbd9","id":"IN-MAL-2026-009160"},{"source":"amazon-inspector","versions":["0.8.0"],"modified_time":"2026-07-09T15:35:28Z","import_time":"2026-07-09T16:20:45.668667895Z","sha256":"cf02bb9a8a8ebef5ffaf6365ca0b03c34c985449ba2a2e8b07b865ce92170111","id":"IN-MAL-2026-009149"},{"source":"amazon-inspector","versions":["0.3.1"],"id":"IN-MAL-2026-009153","import_time":"2026-07-09T16:20:46.002289568Z","sha256":"fd64932774287cd6f874b3de8b56a24a76a3c627b997add0969844cde5c01745","modified_time":"2026-07-09T15:36:03Z"},{"source":"amazon-inspector","versions":["0.9.0"],"id":"IN-MAL-2026-009163","import_time":"2026-07-09T16:20:47.126453893Z","sha256":"14e221533e633ff8e4b01a9a4d06cbadfc9609884d764b00446eb2983e52c287","modified_time":"2026-07-09T15:37:32Z"},{"source":"amazon-inspector","versions":["0.3.0"],"id":"IN-MAL-2026-009162","import_time":"2026-07-09T16:20:47.03766034Z","sha256":"770cb7c429769fbb961ac64f40e123b72eb517725ca67e2767b910ea17df66ad","modified_time":"2026-07-09T15:37:22Z"},{"source":"amazon-inspector","versions":["0.1.1"],"import_time":"2026-07-09T16:20:46.891115038Z","modified_time":"2026-07-09T15:37:12Z","sha256":"8a43b0bd3245d9b5a3d9347bb5181d34dfe05073155c7e6529fadf1044fdbb9b","id":"IN-MAL-2026-009161"},{"source":"amazon-inspector","versions":["0.4.0"],"sha256":"a3008351b8a7ff1de95613cadc66f11c0adb6f1739795f527b2c9138280eed8f","modified_time":"2026-07-09T15:36:53Z","import_time":"2026-07-09T16:20:46.664721138Z","id":"IN-MAL-2026-009159"},{"source":"amazon-inspector","versions":["0.1.3"],"modified_time":"2026-07-09T15:37:41Z","import_time":"2026-07-09T16:20:47.198762298Z","sha256":"e13bd581532ccffac74a09beb76c2cf051b03751911b76d44009e6070096afef","id":"IN-MAL-2026-009164"},{"source":"amazon-inspector","versions":["0.5.0"],"import_time":"2026-07-09T16:20:45.804665651Z","modified_time":"2026-07-09T15:35:44Z","sha256":"8f364d4a00dcf1d112e776aad70cde23a87c665ef0897183f9ed2c4f3747222e","id":"IN-MAL-2026-009151"},{"source":"amazon-inspector","versions":["1.0.1"],"modified_time":"2026-07-09T15:35:37Z","import_time":"2026-07-09T16:20:45.733383468Z","sha256":"22d68bdfced357622e33e4608bd35ded4d8988ea6dc7da073b3a83075978815d","id":"IN-MAL-2026-009150"},{"source":"amazon-inspector","versions":["0.1.2"],"modified_time":"2026-07-09T15:36:37Z","import_time":"2026-07-09T16:20:46.387641924Z","sha256":"43b5469136197b48c662745610d86854a1c63004e8b448abb1624c80de1e9340","id":"IN-MAL-2026-009157"},{"source":"amazon-inspector","versions":["1.2.0"],"modified_time":"2026-07-09T15:36:11Z","import_time":"2026-07-09T16:20:46.080208197Z","sha256":"468ae3c100e7950c66f788c6b6b686b36451a37e66efe61e7c1ece9e13278d99","id":"IN-MAL-2026-009154"},{"source":"amazon-inspector","versions":["1.0.0"],"modified_time":"2026-07-09T15:36:29Z","import_time":"2026-07-09T16:20:46.29916727Z","sha256":"4deda0f119a1e94c5e950b0926449ef67b28fc22268073859e76ba155b555cf9","id":"IN-MAL-2026-009156"}]},"references":[{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-cfv7-74pc-vmff"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/1.2.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/1.1.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/1.2.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/1.1.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/0.7.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/0.1.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/0.2.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/0.2.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/0.6.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/0.8.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/0.3.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/0.9.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/0.3.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/0.1.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/0.4.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/0.1.3"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/0.5.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/1.0.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/0.1.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/1.2.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mcp-server-pg/v/1.0.0"}],"affected":[{"package":{"name":"mcp-server-pg","ecosystem":"npm","purl":"pkg:npm/mcp-server-pg"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.2.1","1.1.0","1.2.2","1.1.1","0.7.0","0.1.0","0.2.1","0.2.0","0.6.0","0.8.0","0.3.1","0.9.0","0.3.0","0.1.1","0.4.0","0.1.3","0.5.0","1.0.1","0.1.2","1.2.0","1.0.0"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/mcp-server-pg/MAL-2026-6922.json","indicators":{"evidence_files":[{"tlsh":"d372a87145e605123762e95db74b2081f756f2237a08e8a07a9db2095fce91093b36ff","path":"scripts/postinstall.cjs","sha256":"c30bd4c9980f14c5fbb5c7cb4195cb6e45ceadf55cc694f63b280e0b42a8c85e"}]},"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"},{"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"},{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"},{"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"},{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"},{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"},{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"},{"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"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"},{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"},{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"},{"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"}]}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}