2026-09-21 21:39CVE-2026-61852GitHub_M
PUBLISHED5.2CWE-89

Chartbrew: SQL Injection via row_limit Parameter in AI runQuery Tool

Chartbrew is an open-source web application that can connect directly to databases and APIs and use the data to create charts. Prior to 5.2.2, Chartbrew's runQuery() implementation in server/modules/ai/orchestrator/tools/runQuery.js interpolates the AI tool's row_limit parameter into a SQL LIMIT clause without runtime integer validation. The read-only keyword check runs before this value is appended, so an authenticated user who can influence a model-generated non-integer row_limit can add SQL that bypasses the earlier check. Successful exploitation can execute arbitrary statements against the connected database, including reading or changing data and, where database permissions permit, accessing files or executing operating-system commands. This issue is fixed in version 5.2.2.

Problem type

Affected products

chartbrew

chartbrew

< 5.2.2 - AFFECTED

References

JSON source

https://cveawg.mitre.org/api/cve/CVE-2026-61852
Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2026-61852",
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "dateUpdated": "2026-09-21T21:39:52.579Z",
    "dateReserved": "2026-07-10T20:28:17.513Z",
    "datePublished": "2026-09-21T21:39:52.579Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M",
        "dateUpdated": "2026-09-21T21:39:52.579Z"
      },
      "title": "Chartbrew: SQL Injection via row_limit Parameter in AI runQuery Tool",
      "descriptions": [
        {
          "lang": "en",
          "value": "Chartbrew is an open-source web application that can connect directly to databases and APIs and use the data to create charts. Prior to 5.2.2, Chartbrew's runQuery() implementation in server/modules/ai/orchestrator/tools/runQuery.js interpolates the AI tool's row_limit parameter into a SQL LIMIT clause without runtime integer validation. The read-only keyword check runs before this value is appended, so an authenticated user who can influence a model-generated non-integer row_limit can add SQL that bypasses the earlier check. Successful exploitation can execute arbitrary statements against the connected database, including reading or changing data and, where database permissions permit, accessing files or executing operating-system commands. This issue is fixed in version 5.2.2."
        }
      ],
      "affected": [
        {
          "vendor": "chartbrew",
          "product": "chartbrew",
          "versions": [
            {
              "version": "< 5.2.2",
              "status": "affected"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')",
              "cweId": "CWE-89",
              "type": "CWE"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://github.com/chartbrew/chartbrew/security/advisories/GHSA-4923-m569-jc42",
          "name": "https://github.com/chartbrew/chartbrew/security/advisories/GHSA-4923-m569-jc42",
          "tags": [
            "x_refsource_CONFIRM"
          ]
        },
        {
          "url": "https://github.com/chartbrew/chartbrew/commit/8c8412edce56093e81b524e0235a796c7dd42336",
          "name": "https://github.com/chartbrew/chartbrew/commit/8c8412edce56093e81b524e0235a796c7dd42336",
          "tags": [
            "x_refsource_MISC"
          ]
        },
        {
          "url": "https://github.com/chartbrew/chartbrew/releases/tag/v5.2.2",
          "name": "https://github.com/chartbrew/chartbrew/releases/tag/v5.2.2",
          "tags": [
            "x_refsource_MISC"
          ]
        }
      ],
      "metrics": [
        {}
      ]
    }
  }
}