MAL-2026-6922

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/mcp-server-pg/MAL-2026-6922.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-6922
Aliases
  • GHSA-cfv7-74pc-vmff
Published
2026-07-07T13:59:38Z
Modified
2026-07-08T21:46:51.539527483Z
Summary
Malicious code in mcp-server-pg (npm)
Details

-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (1384f3305e9a1608107ce7bf6b7511b2ac735737f84c3370ed3848e59a16c797)

scripts/postinstall.cjs runs unconditionally on npm install and harvests installer-owned identity and credential-adjacent data: git-configured email from ~/.gitconfig and repo.git/config, gh CLI login/email from ~/.config/gh/hosts.yml, git reflog committer emails, SSH public key comments from ~/.ssh/*.pub, os.hostname(), os.userInfo(), Windows USERDOMAIN\USERNAME, /etc/resolv.conf search domain, GCP project+account from ~/.config/gcloud/properties, AWS profile names from ~/.aws/config, parent project name/author/repo, cwd, and CI provider. The collected JSON is POSTed via https.request to the hardcoded host npm-package-logger-228835561205.europe-west1.run.app. None of this is needed by a PostgreSQL MCP server; the 'anonymous diagnostics' banner is a cover story since the payload contains personal identifiers, SCM identity, cloud account identifiers, and SSH key comments rather than aggregate metrics. Enumeration of ~/.ssh and reads of ~/.aws/config and gh hosts.yml touch installer secret-adjacent paths the package never wrote.

Source: ghsa-malware (7d7c8e9391621ff69fb62a9e247b738b4d20cfdfc4cccc44c2a86f17831f18f6)

Any 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.

Database specific
{
    "malicious-packages-origins": [
        {
            "ranges": [
                {
                    "type": "SEMVER",
                    "events": [
                        {
                            "introduced": "0"
                        }
                    ]
                }
            ],
            "id": "GHSA-cfv7-74pc-vmff",
            "source": "ghsa-malware",
            "import_time": "2026-07-07T15:15:50.703610675Z",
            "sha256": "7d7c8e9391621ff69fb62a9e247b738b4d20cfdfc4cccc44c2a86f17831f18f6",
            "modified_time": "2026-07-07T13:59:45Z"
        },
        {
            "sha256": "1384f3305e9a1608107ce7bf6b7511b2ac735737f84c3370ed3848e59a16c797",
            "id": "IN-MAL-2026-008608",
            "source": "amazon-inspector",
            "import_time": "2026-07-08T21:27:50.029677974Z",
            "modified_time": "2026-07-08T20:35:44Z",
            "versions": [
                "1.2.1"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / mcp-server-pg

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

1.*
1.2.1

Database specific

indicators
{
    "evidence_files": [
        {
            "path": "scripts/postinstall.cjs",
            "tlsh": "d372a87145e605123762e95db74b2081f756f2237a08e8a07a9db2095fce91093b36ff",
            "sha256": "c30bd4c9980f14c5fbb5c7cb4195cb6e45ceadf55cc694f63b280e0b42a8c85e"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/mcp-server-pg/MAL-2026-6922.json"
cwes
[
    {
        "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"
    }
]