SQL Injection Affecting @langchain/google-cloud-sql-pg package, versions <1.0.22


Severity

Recommended
0.0
low
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about SQL Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-LANGCHAINGOOGLECLOUDSQLPG-15870165
  • published1 Apr 2026
  • disclosed1 Apr 2026
  • creditUnknown

Introduced: 1 Apr 2026

New CVE NOT AVAILABLE CWE-89  (opens in a new tab)

How to fix?

Upgrade @langchain/google-cloud-sql-pg to version 1.0.22 or higher.

Overview

@langchain/google-cloud-sql-pg is a LangChain.js integrations for Google Cloud SQL for PostgreSQL

Affected versions of this package are vulnerable to SQL Injection via the PostgresChatMessageHistory.initialize() method due to the improper parameters validation before incorporating them into SQL statements. An attacker can execute arbitrary SQL commands by supplying crafted input with modified parameters table and schema.

References

CVSS Base Scores

version 4.0
version 3.1