{"id":"GHSA-6p5q-h963-pwwf","revision":null,"records":[{"revision":"8d2e90eecee44b4081376856e37464e0","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2022-45786","aliases":[],"title":"Apache AGE: Python and Golang drivers allow data manipulation and exposure due to SQL injection","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.\n\nThe 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\u00A0 PostgreSQL 12.\n\nThe 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.\n\nBackground (for those who want more information):\n\nAfter 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.\n\nThe 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.\n\nThe 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.\n\nThe 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.\n\nThis method will allow the parameterizing of the cypher() function indirectly and provide a way to lock out SQL injection attacks.","state":0,"publishedAt":"2023-02-04T20:40:58.631+00:00","modifiedAt":"2025-03-26T13:58:49.953+00:00","affected":[{"ecosystem":"Vendor product","name":"Apache AGE","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"defaultStatus\": \"unaffected\",\n                    \"product\": \"Apache AGE\",\n                    \"vendor\": \"Apache Software Foundation\",\n                    \"versions\": [\n                        {\n                            \"lessThanOrEqual\": \"1.1.0\",\n                            \"status\": \"affected\",\n                            \"version\": \"Apache AGE for PostgreSQL 12\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"lessThanOrEqual\": \"1.1.0\",\n                            \"status\": \"affected\",\n                            \"version\": \"Apache AGE for PostgreSQL 11\",\n                            \"versionType\": \"semver\"\n                        }\n                    ]\n                }"}],"metrics":[],"references":["https://lists.apache.org/thread/of8x0gt5d2vfrm5ksxw55bwn2849ck1w"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2022-45786","license":"CVE Program Terms of Use","key":"cve-program:CVE-2022-45786","identifiers":["CVE-2022-45786"]},"retained":false,"historicalAffected":[]},{"revision":"0ce3aa61250548d3adde67a449c96e05","observedAt":"2026-11-24T10:33:19.26+00:00","statement":{"source":"euvd","id":"EUVD-2023-0642","aliases":["CVE-2022-45786","GHSA-6p5q-h963-pwwf"],"title":"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.","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.\n\nThe 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\u00A0 PostgreSQL 12.\n\nThe 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.\n\nBackground (for those who want more information):\n\nAfter 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.\n\nThe 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.\n\nThe 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.\n\nThe 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.\n\nThis method will allow the parameterizing of the cypher() function indirectly and provide a way to lock out SQL injection attacks.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"severity":null}],"references":["https://lists.apache.org/thread/of8x0gt5d2vfrm5ksxw55bwn2849ck1w"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2023-0642","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Feb 4, 2023, 8:40:58 PM","dateUpdated":"Mar 26, 2025, 1:58:49 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2023-0642","identifiers":["EUVD-2023-0642","CVE-2022-45786","GHSA-6p5q-h963-pwwf"]},"retained":false,"historicalAffected":[]},{"revision":"d2f634b1cfc0445f8fdcfc2ad69c059e","observedAt":"2026-10-24T21:17:16.533+00:00","statement":{"source":"nvd","id":"CVE-2022-45786","aliases":[],"title":"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.","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.\n\nThe 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\u00A0 PostgreSQL 12.\n\nThe 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.\n\nBackground (for those who want more information):\n\nAfter 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.\n\nThe 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.\n\nThe 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.\n\nThe 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.\n\nThis method will allow the parameterizing of the cypher() function indirectly and provide a way to lock out SQL injection attacks.","state":0,"publishedAt":"2023-02-04T21:15:09.023+00:00","modifiedAt":"2026-06-17T05:10:43.6+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"severity":"HIGH"},{"system":"CVSS 3.1 · 134c704f-9b21-4f2e-91b3-4a467353bcc0 · Secondary","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"severity":"HIGH"}],"references":["https://lists.apache.org/thread/of8x0gt5d2vfrm5ksxw55bwn2849ck1w"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2022-45786","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Modified","weaknesses":["CWE-89"],"productCriteria":["cpe:2.3:a:apache:age:*:*:*:*:*:postgresql:*:*"],"sourceDates":{"published":"2023-02-04T21:15:09.023","lastModified":"2026-06-17T05:10:43.600"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2022-45786","identifiers":["CVE-2022-45786"]},"retained":false,"historicalAffected":[]},{"revision":"a3e88b00375241058464d119ca236978","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-6p5q-h963-pwwf","aliases":["CVE-2022-45786","GO-2024-2587","PYSEC-2026-769"],"title":"Apache AGE: Python and Golang drivers allow data manipulation and exposure due to SQL injection","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.","state":0,"publishedAt":"2023-02-04T21:30:22+00:00","modifiedAt":"2026-07-07T11:56:24.2257783+00:00","affected":[{"ecosystem":"Go","name":"github.com/apache/age/drivers/golang","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.1.1"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"PyPI","name":"apache-age-python","ranges":[{"type":"ECOSYSTEM","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.0.5"}]}],"versions":["0.0.1","0.0.2","0.0.3","0.0.4"],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://nvd.nist.gov/vuln/detail/CVE-2022-45786","https://github.com/apache/age","https://lists.apache.org/thread/of8x0gt5d2vfrm5ksxw55bwn2849ck1w"],"sourceUrl":"https://github.com/advisories/GHSA-6p5q-h963-pwwf","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-6p5q-h963-pwwf","identifiers":["GHSA-6p5q-h963-pwwf","CVE-2022-45786","GO-2024-2587","PYSEC-2026-769"]},"retained":false,"historicalAffected":[]},{"revision":"8b344f28c88e4fb38cd3724c24206413","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2024-2587","aliases":["CVE-2022-45786","GHSA-6p5q-h963-pwwf","PYSEC-2026-769"],"title":"SQL injection in github.com/apache/age/drivers/golang","description":"SQL injection in github.com/apache/age/drivers/golang","state":0,"publishedAt":"2024-03-04T17:29:23+00:00","modifiedAt":"2026-07-07T11:56:24.2257783+00:00","affected":[{"ecosystem":"Go","name":"github.com/apache/age/drivers/golang","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://nvd.nist.gov/vuln/detail/CVE-2022-45786","https://lists.apache.org/thread/of8x0gt5d2vfrm5ksxw55bwn2849ck1w"],"sourceUrl":"https://osv.dev/vulnerability/GO-2024-2587","license":"OSV · upstream source license applies","key":"osv:GO-2024-2587","identifiers":["GO-2024-2587","CVE-2022-45786","GHSA-6p5q-h963-pwwf","PYSEC-2026-769"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-25T16:30:51.6399626+00:00","complete":true,"records":1796,"lastAttemptAt":"2026-11-25T16:30:51.6399626+00:00","lastSuccessAt":"2026-11-25T16:30:52.034918+00:00","error":null,"lastVerifiedAt":"2026-11-25T16:30:52.0349214+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-8d356adab43082cb10bb7c033ed58312cf2ad2f0fb10e0afdf27fc89fa361f3b-eff9d08c8f0fa32ddca8b3faeb4fb15ed8fd3be7ad4cea54f526276594975076","complete":true,"records":432225,"lastAttemptAt":"2026-11-25T16:28:38.1682659+00:00","lastSuccessAt":"2026-11-25T16:28:38.0153955+00:00","error":null,"lastVerifiedAt":"2026-11-25T16:28:38.1682659+00:00","snapshotPublishedAt":"2026-11-25T16:27:14+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-fe3c1be5a79449a09eb76cfe4a645b7c","complete":false,"records":13939,"lastAttemptAt":"2026-11-25T16:41:38.9086864+00:00","lastSuccessAt":"2026-11-25T16:41:37.884+00:00","error":"153 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-25T16:41:37.884+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13628,"expectedIdentifiers":13987,"failedIdentifiers":153},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-25T16:30:51.6399626+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-25T16:30:51.6399626+00:00","lastSuccessAt":"2026-11-25T16:30:52.035995+00:00","error":null,"lastVerifiedAt":"2026-11-25T16:30:52.0359954+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-b1697be945394a11bfe4d90c22645cd8","complete":true,"records":13951,"lastAttemptAt":"2026-11-25T16:30:53.1656546+00:00","lastSuccessAt":"2026-11-25T16:30:53.16+00:00","error":null,"lastVerifiedAt":"2026-11-25T16:30:53.16+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13987,"expectedIdentifiers":13987,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-70b1e3058f76fab20c77bb1c4924a4c57f7654dd208befb5b1f237e682d6ddca","complete":true,"records":10077,"lastAttemptAt":"2026-11-25T16:30:51.4950342+00:00","lastSuccessAt":"2026-11-25T11:46:59.5507764+00:00","error":null,"lastVerifiedAt":"2026-11-25T16:30:51.4950342+00:00","snapshotPublishedAt":"2026-11-25T11:03:15+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-25T16:28:38.3174258+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-25T16:28:38.3174258+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-5be533520b83c9bfaebc80695093f6f0d59feafc2a1eab94e91dd79d1bb9241b","complete":true,"records":3222,"lastAttemptAt":"2026-11-25T16:30:51.5978795+00:00","lastSuccessAt":"2026-11-25T11:47:03.6026853+00:00","error":null,"lastVerifiedAt":"2026-11-25T16:30:51.5978795+00:00","snapshotPublishedAt":"2026-11-25T11:18:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-93117e9f4237570c8330a2370f4c3e20e3306a5fa2ad4a5c945eb39d2bbbbbda","complete":true,"records":233129,"lastAttemptAt":"2026-11-25T16:30:51.3700222+00:00","lastSuccessAt":"2026-11-25T16:30:50.1279622+00:00","error":null,"lastVerifiedAt":"2026-11-25T16:30:51.3700222+00:00","snapshotPublishedAt":"2026-11-25T15:33:14+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}