Apache AGE: Python and Golang drivers allow data manipulation and exposure due to SQL injection
Published Feb 4, 2023
8.1
HIGHCVSS 3.1
EPSS 0.96%
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.
Affected products
-
- Version Apache AGE for PostgreSQL 11StatusaffectedConstraints<=1.1.0
- Version Apache AGE for PostgreSQL 12StatusaffectedConstraints<=1.1.0
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Apache Software Foundation | Apache AGE | unaffected |
|
No data.
No Red Hat product state for this CVE.
apache-age-python
PyPI
Introduced 0 Fixed 0.0.5github.com/apache/age/drivers/golang
Go
Introduced 0 Fixed not fixed
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| PyPI | apache-age-python | 0 | 0.0.5 |
| Go | github.com/apache/age/drivers/golang | 0 | not fixed |
Remediation
No remediation recorded yet.
Metrics
No CVSS v4.0 score for this CVE.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
No CVSS v3.0 score for this CVE.
No CVSS v2.0 score for this CVE.
This CVE is not in the KEV list.
CISA SSVC (Vulnrichment)
Stakeholder-Specific Vulnerability Categorization from CISA ADP.
Exploitation
NoneAutomatable
NoTechnical Impact
TotalDecision
n/aAssessed Mar 26, 2025 · SSVC 2.0.3
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2023–2026- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (13 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 0.96% (0.00956) | 60.00th | v5 (v2026.06.15) |
| Jun 15, 2026 | 0.95% (0.00948) | 56.38th | v5 (v2026.06.15) |
| Mar 17, 2025 | 0.05% (0.00052) | 13.45th | v4 (v2025.03.14) |
| Dec 12, 2024 | 0.11% (0.00112) | 46.11th | v3 (v2023.03.01) |
| Jul 17, 2024 | 0.11% (0.00112) | 44.96th | v3 (v2023.03.01) |
| Jun 20, 2024 | 0.08% (0.00076) | 32.73th | v3 (v2023.03.01) |
| Mar 8, 2024 | 0.07% (0.00075) | 30.52th | v3 (v2023.03.01) |
| Feb 11, 2024 | 0.08% (0.00080) | 32.57th | v3 (v2023.03.01) |
| Mar 16, 2023 | 0.07% (0.00068) | 27.84th | v3 (v2023.03.01) |
| Mar 7, 2023 | 0.05% (0.00047) | 14.29th | v3 (v2023.03.01) |
| Mar 6, 2023 | 1.09% (0.01086) | 53.47th | v2 (v2022.01.01) |
| Feb 17, 2023 | 1.09% (0.01086) | 53.02th | v2 (v2022.01.01) |
| Feb 5, 2023 | 2.56% (0.02559) | 81.38th | v2 (v2022.01.01) |
References (3)
- https://github.com/advisories/GHSA-6p5q-h963-pwwf Advisory
- https://lists.apache.org/thread/of8x0gt5d2vfrm5ksxw55bwn2849ck1w vendor-advisoryMailing ListThird Party Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2022-45786
| Link | Providers | Tags |
|---|---|---|
| https://github.com/advisories/GHSA-6p5q-h963-pwwf | Advisory | |
| https://lists.apache.org/thread/of8x0gt5d2vfrm5ksxw55bwn2849ck1w | vendor-advisoryMailing ListThird Party Advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-45786 |
Change history (0)
No recorded changes yet.