{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:instantcms:instantcms:2.16.2:*:*:*:*:*:*:*",
            "extracted_events": [
              {
                "introduced": "= 2.16.2"
              },
              {
                "last_affected": "= 2.16.2"
              },
              {
                "introduced": "2.16.2"
              },
              {
                "last_affected": "2.16.2"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "CPE_STRING"
            ]
          },
          "events": [
            {
              "introduced": "c710ff6c753ae9d726c4c2bbdd8440fed834c6a7"
            },
            {
              "last_affected": "c710ff6c753ae9d726c4c2bbdd8440fed834c6a7"
            }
          ],
          "repo": "https://github.com/instantsoft/icms2",
          "type": "GIT"
        }
      ],
      "versions": [
        "2.16.2",
        "= 2.16.2"
      ]
    }
  ],
  "aliases": [
    "GHSA-qx95-w566-73fw"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-20",
      "CWE-89"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/31xxx/CVE-2024-31212.json"
  },
  "details": "InstantCMS is a free and open source content management system. A SQL injection vulnerability affects instantcms v2.16.2 in which an attacker with administrative privileges can cause the application to execute unauthorized SQL code. The vulnerability exists in index_chart_data action, which receives an input from user and passes it unsanitized to the core model `filterFunc` function that further embeds this data in an SQL statement. This allows attackers to inject unwanted SQL code into the statement. The `period` should be escaped before inserting it in the query. As of time of publication, a patched version is not available.",
  "id": "CVE-2024-31212",
  "modified": "2026-08-12T03:51:16.104826621Z",
  "published": "2024-04-04T23:02:38.775Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/instantsoft/icms2/blob/4691a1524780e74107f6009b48d91e17a81b0fa1/system/controllers/admin/actions/index_chart_data.php#L190"
    },
    {
      "type": "WEB",
      "url": "https://github.com/instantsoft/icms2/blob/4691a1524780e74107f6009b48d91e17a81b0fa1/system/core/model.php#L744"
    },
    {
      "type": "WEB",
      "url": "https://user-images.githubusercontent.com/109034767/300806111-a33d9548-d99f-4034-bef3-fbd7fa62c37f.png"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/31xxx/CVE-2024-31212.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/instantsoft/icms2/security/advisories/GHSA-qx95-w566-73fw"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-31212"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "SQL injection in index_chart_data action"
}