Read the docs
TI-2022-22594 Aliases CVE-2022-45786GHSA-6p5q-h963-pwwf

Apache AGE: Python and Golang drivers allow data manipulation and exposure due to SQL injection

Priority LOW 39CWE-89Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
High
Impact type
SQL injection
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA and GitHub. Impact type from CWE-89.

Summary

There are issues with the AGE drivers for Golang and Python that enable SQL injections to occur. This impacts AGE for PostgreSQL 11 & AGE for PostgreSQL 12, all versions up-to-and-including 1.1.0, when using those drivers. The fix is to update to the latest Golang and Python drivers in addition to the latest version of AGE that is used for PostgreSQL 11 or  PostgreSQL 12. The update of AGE will add a new function to enable parameterization of the cypher() function, which, in conjunction with the driver updates, will resolve this issue. Background (for those who want more information): After thoroughly researching this issue, we found that due to the nature of the cypher() function, it was not easy to parameterize the values passed into it. This enabled SQL injections, if the developer of the driver wasn't careful. The developer of the Golang and Pyton drivers didn't fully utilize parameterization, likely because of this, thus enabling SQL injections. The obvious fix to this issue is to use parameterization in the drivers for all PG SQL queries. However, parameterizing all PG queries is complicated by the fact that the cypher() function call itself cannot be parameterized directly, as it isn't a real function. At least, not the parameters that would take the graph name and cypher query. The reason the cypher() function cannot have those values parameterized is because the function is a placeholder and never actually runs. The cypher() function node, created by PG in the query tree, is transformed and replaced with a query tree for the actual cypher query during the analyze phase. The problem is that parameters - that would be passed in and that the cypher() function transform needs to be resolved - are only resolved in the execution phase, which is much later. Since the transform of the cypher() function needs to know the graph name and cypher query prior to execution, they can't be passed as parameters. The fix that we are testing right now, and are proposing to use, is to create a function that will be called prior to the execution of the cypher() function transform. This new function will allow values to be passed as parameters for the graph name and cypher query. As this command will be executed prior to the cypher() function transform, its values will be resolved. These values can then be cached for the immediately following cypher() function transform to use. As added features, the cached values will store the calling session's pid, for validation. And, the cypher() function transform will clear this cached information after function invocation, regardless of whether it was used. This method will allow the parameterizing of the cypher() function indirectly and provide a way to lock out SQL injection attacks.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00956 61st percentileScored 2026-11-07
Fix Fixed github.com/apache/age/drivers/golang (Go): 1.1.1apache-age-python (PyPI): 0.0.5

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
ApacheApache AGEApache AGE for PostgreSQL 12 – 1.1.0; Apache AGE for PostgreSQL 11 – 1.1.0—No fix listedCNA
—github.com/apache/age/drivers/golang (Go)before 1.1.11.1.1Patch availableGHSA-6p5q-h963-pwwf
—apache-age-python (PyPI)before 0.0.50.0.5Patch availableGHSA-6p5q-h963-pwwf
  • Apache AGE VendorApache Affected Apache AGE for PostgreSQL 12 – 1.1.0; Apache AGE for PostgreSQL 11 – 1.1.0 Fixed in — No fix listed CNA
  • github.com/apache/age/drivers/golang (Go) Vendor— Affected before 1.1.1 Fixed in 1.1.1 Patch available GHSA-6p5q-h963-pwwf
  • apache-age-python (PyPI) Vendor— Affected before 0.0.5 Fixed in 0.0.5 Patch available GHSA-6p5q-h963-pwwf

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:apache:age:*:*:*:*:*:postgresql:*:*up to 1.1.0VulnerableApache
  • cpe:2.3:a:apache:age:*:*:*:*:*:postgresql:*:* Versions up to 1.1.0 Vulnerable ·Apache

Remediation

  • Fix · GHSA-6p5q-h963-pwwf github.com/apache/age/drivers/golang (Go) Fixed in 1.1.1 Advisory →
  • Fix · GHSA-6p5q-h963-pwwf apache-age-python (PyPI) Fixed in 0.0.5 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2022-45786
  2. 2026-10-03 Alias added: GHSA-6p5q-h963-pwwf

References

Sources