8.1

CVE-2022-45786: apache software foundation apache age SQL Injection

CVSS: 8.1v3.1HighModified
AliasesGHSA-6p5q-h963-pwwfGO-2024-2587PYSEC-2026-769
Published 04-02-2023Last modified 26-03-2025

Vulnerability summary

CVE-2022-45786 is a high (CVSS 8.1) SQL Injection vulnerability in apache software foundation apache age. EPSS estimates a 0.96% chance of exploitation in the next 30 days, higher than 61% of scored vulnerabilities.

Overall risk
33/100
0100
Medium · default modelHow is this calculated?
CVSS score
8.1/10
010
High · v3.1 (CVE.org)
EPSS score
0.96%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 1 · Related 1

Timeline

  1. 04-02-2023
    PublishedVulnerability first disclosed.
  2. 26-03-2025
    Last modifiedVulnerability information updated.

Description

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.

CVSS metrics

4 scores · 4 sources · 1 version

EPSS trend

Probability

0.96%

Chance of exploitation in the next 30 days

Percentile

61%

Versus all other CVEs

30-day change

0.00 pp

From 0.96% on 22-09-2026

22-09-202622-10-2026
EPSS score
0.96%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Apache1 product
Apache software foundation1 product
  • apache age≥ Apache AGE for PostgreSQL 12, ≤ 1.1.0 | ≥ Apache AGE for PostgreSQL 11, ≤ 1.1.0
Github.com/apache/age/drivers1 product
  • golang< 1.1.1 | All versions (No fix recorded)
PyPI1 product
  • apache-age-python< 0.0.5

4 vendors · 4 products

References

5 links