AploSec / Disclosures / CVE-2026-142201
pg-protocol through 1.16.1 NUL Byte Injection via StartupMessage Parameters
CVE-2026-142201 · published 2026-12-02
In plain words: this type of bug lets someone inject their own content into data the application builds (injection). No fixed release is listed yet.
Summary
CVE-2026-142201 affects pg-protocol (npm) <= 1.16.1: NUL Byte Injection via StartupMessage Parameters (CWE-158). No fixed release is listed. CVSS 4.0 base score 6.3 (Medium), assigned by VulnCheck. Published 2026-12-02 by VulnCheck. Credit: Zachariah Mithani (AploSec).
pg-protocol through 1.16.1 (node-postgres pg through 8.23.1) contains a NUL byte injection vulnerability in the startup() serializer that allows attackers to add server parameters. Attackers who influence connection values like application_name or database can inject search_path or a second database key to change the session's database or schema resolution.
Evidence
Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.
Remediation
No fixed release is listed in the advisory. Check the references for upstream status.
References
- VulnCheck advisoryhttps://www.vulncheck.com/advisories/pg-protocol-through-1.16.1-nul-byte-injection-via-startupmessage-parameters
- Vulnerable codehttps://github.com/brianc/node-postgres/blob/0980cefebe0ae461da8883703be049fe13ca96cf/packages/pg-protocol/src/serializer.ts#L21-L35
- Vulnerable codehttps://github.com/brianc/node-postgres/blob/0980cefebe0ae461da8883703be049fe13ca96cf/packages/pg-protocol/src/buffer-writer.ts#L39-L51
- Vulnerable codehttps://github.com/brianc/node-postgres/blob/0980cefebe0ae461da8883703be049fe13ca96cf/packages/pg/lib/client.js#L543-L571
- CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-142201
- Severity
- Medium 6.3CVSS 4.0, scored by VulnCheck in the CVE record
- Package
- pg-protocol
- Ecosystem
- npm
- Affected
- <= 1.16.1
- Fixed
- None
- Weakness
- CWE-158
- CNA
- VulnCheck
- Credit
- Zachariah Mithani (AploSec)finder