CVE-2024-27097: Ckan Potential Log Injection Vulnerability

MODERATE
Advisory Identifier: GHSA-8g38-3m6v-232j
CVSS 4.3
CWE-532 CWE-117
Published
Advisory Summary

CVE-2024-27097 is a MODERATE (CVSS 4.3) potential log injection vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Ckan libraries in the PyPI ecosystem. The issue involves potential log injection in reset user endpoint in ckan. Remediation is available by upgrading affected packages to version 2.9.11, 2.10.4.

CVE-2024-27097 at a Glance

CVE Identifier CVE-2024-27097
GHSA Identifier GHSA-8g38-3m6v-232j
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-532: Insertion of Sensitive Information into Log File
Affected Product Ckan
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2024-27097

To remediate this vulnerability, upgrade all affected Ckan dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ckan fixed: 2.9.11
pip install ckan>=2.9.11
ckan fixed: 2.10.4
pip install ckan>=2.10.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show ckan

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-27097, inspect your installed packages using pip:

pip show ckan

Analyze the terminal output to locate any version of Ckan in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.9.11), your application is affected.

Note: The pip show ckan command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. In Ckan, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A user endpoint didn't perform filtering on an incoming parameter, which was added directly to the application log. This could lead to an attacker injecting false log entries or corrupt the log file format. ### Patches This has been fixed in the CKAN 2.9.11 and 2.10.4 versions ### Workarounds Override the `/user/reset` endpoint to filter the `id` parameter in order to exclude newlines

CVE-2024-27097 Affected Ckan Versions

2 component(s)
Fixed Versions:
2.9.112.10.4
Product / Package Ecosystem Affected Versions Fixed Version
ckan
PyPI
< 2.9.11
2.9.11
ckan
PyPI
≥ 2.10.0
< 2.10.4
2.10.4

References

Frequently Asked Questions

What is CVE-2024-27097?
CVE-2024-27097 is a security vulnerability in Ckan involving Potential log injection in reset user endpoint in CKAN under CWE-532: Insertion of Sensitive Information into Log File.
Which Ckan versions are affected?
Affected versions include releases prior to 2.9.11, 2.10.4 across affected packages: ckan.
What version fixes CVE-2024-27097?
Upgrading to 2.9.11, 2.10.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ckan affected?
Yes, ckan is affected in releases prior to 2.9.11, 2.10.4. Upgrade your dependency to 2.9.11, 2.10.4 or later.
What is the CVSS score of CVE-2024-27097?
CVE-2024-27097 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2024-27097?
CVE-2024-27097 is classified under CWE-532: Insertion of Sensitive Information into Log File (The product writes sensitive information to a log file.).
How can I check PyPI dependencies for CVE-2024-27097?
Run the dependency tree command: 'pip show ckan'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8g38-3m6v-232j",
  "modified" : "2024-03-13T22:28:40Z",
  "published" : "2024-03-13T15:30:03Z",
  "aliases" : [ "CVE-2024-27097" ],
  "summary" : "Potential log injection in reset user endpoint in CKAN",
  "details" : "A user endpoint didn't perform filtering on an incoming parameter, which was added directly to the application log. This could lead to an attacker injecting false log entries or corrupt the log file format.\n\n### Patches\nThis has been fixed in the CKAN 2.9.11 and 2.10.4 versions\n\n### Workarounds\nOverride the `/user/reset` endpoint to filter the `id` parameter in order to exclude newlines\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "ckan"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.9.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "ckan"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.10.0"
      }, {
        "fixed" : "2.10.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ckan/ckan/security/advisories/GHSA-8g38-3m6v-232j"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-27097"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ckan/ckan/commit/5fa133e7e9019573066455b5d442e93c62b3fc93"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ckan/ckan/commit/81b56c55e5e3651d7fcf9642cd5a489a9b62212c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ckan/ckan/commit/d81f411bff2da7347c343a83e17f5814475b5b64"
  }, {
    "type" : "WEB",
    "url" : "https://docs.ckan.org/en/2.10/changelog.html#v-2-10-4-2024-03-13"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ckan/ckan"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-117", "CWE-532" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-13T15:30:03Z",
    "nvd_published_at" : "2024-03-13T21:15:58Z"
  }
}