Skip to content
Heist/ feed
Back to feed
Medium

MySQL K8s charm could leak credentials for root-level user `serverconfig`

Type: advisorySources: OSV

Charmed MySQL K8s operator is a Charmed Operator for running MySQL on Kubernetes. Before revision 221, the method for calling a SQL DDL or python based mysql-shell scripts can leak database users credentials. The method mysql-operator calls mysql-shell application rely on writing to a temporary script file containing the full URI, with user and password. The file can be read by a unprivileged user during the operator runtime, due it being created with read permissions (0x644). On other cases, when calling mysql cli, for one specific case when creating the operator users, the DDL contains said users credentials, which can be leak through the same mechanism of a temporary file. All versions prior to revision 221 for kubernetes and revision 338 for machine operators.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-24375
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 16:32 UTC · Revision 1

Source evidence

MySQL K8s charm could leak credentials for root-level user `serverconfig`

core-osv · Original source

Published 9 Apr 2025, 22:21 UTC

Charmed MySQL K8s operator is a Charmed Operator for running MySQL on Kubernetes. Before revision 221, the method for calling a SQL DDL or python based mysql-shell scripts can leak database users credentials. The method mysql-operator calls mysql-shell application rely on writing to a temporary script file containing the full URI, with user and password. The file can be read by a unprivileged user during the operator runtime, due it being created with read permissions (0x644). On other cases, when calling mysql cli, for one specific case when creating the operator users, the DDL contains said users credentials, which can be leak through the same mechanism of a temporary file. All versions prior to revision 221 for kubernetes and revision 338 for machine operators.

osv:CVE-2025-24375
Complete source record
{
  "id": "39a65fbfd99a38a0b64442f9c5cfcccd03fef6bb98a519f7913c09fb0612067b",
  "url": "https://osv.dev/vulnerability/CVE-2025-24375",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "MySQL K8s charm could leak credentials for root-level user `serverconfig`",
    "summary": "Charmed MySQL K8s operator is a Charmed Operator for running MySQL on Kubernetes. Before revision 221, the method for calling a SQL DDL or python based mysql-shell scripts can leak database users credentials. The method mysql-operator calls mysql-shell application rely on writing to a temporary script file containing the full URI, with user and password. The file can be read by a unprivileged user during the operator runtime, due it being created with read permissions (0x644). On other cases, when calling mysql cli, for one specific case when creating the operator users, the DDL contains said users credentials, which can be leak through the same mechanism of a temporary file. All versions prior to revision 221 for kubernetes and revision 338 for machine operators.",
    "evidence": "osv:CVE-2025-24375",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-24375",
      "aliases": [
        "CVE-2025-24375",
        "GHSA-g83v-7694-2hf7"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/canonical/mysql-k8s-operator",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "c8e60d4b4dd91e3515ef43e0cf5c78ceb6c22118"
                },
                {
                  "fixed": "7c6b1206fcbc7324b72f413c5e63216e742a71a1"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "rev221"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "7c6b1206fcbc7324b72f413c5e63216e742a71a1"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            },
            {
              "repo": "https://github.com/canonical/mysql-operator",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1fb61c1ee3e396cdce13d5e8155f2f32a860f89e"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "fixed": "1fb61c1ee3e396cdce13d5e8155f2f32a860f89e"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "rev220",
            "rev219",
            "rev218",
            "rev217",
            "rev215",
            "rev214",
            "rev213",
            "rev212",
            "rev211",
            "rev210",
            "rev209",
            "rev208",
            "rev207",
            "rev206",
            "rev205",
            "rev204",
            "rev203",
            "rev202",
            "rev201",
            "rev200",
            "rev199",
            "rev198",
            "rev197",
            "rev196",
            "rev195",
            "rev194",
            "rev193",
            "rev192",
            "rev191",
            "rev190",
            "rev189",
            "rev188",
            "rev187",
            "rev186",
            "rev185",
            "rev184",
            "rev183",
            "rev182",
            "rev181",
            "rev180",
            "rev179",
            "rev178",
            "rev177",
            "rev176",
            "rev175",
            "rev174",
            "rev173",
            "rev172",
            "rev171",
            "rev170",
            "rev169",
            "rev167",
            "rev165",
            "rev163",
            "rev161",
            "rev159",
            "rev155",
            "rev153",
            "rev152",
            "rev150",
            "rev149",
            "rev148",
            "rev147",
            "rev146",
            "rev145",
            "rev144",
            "rev138",
            "rev137",
            "rev136",
            "rev132",
            "rev127",
            "rev123",
            "rev122",
            "rev121",
            "rev120",
            "rev119",
            "rev118",
            "rev114",
            "rev113",
            "rev112",
            "rev111",
            "rev110",
            "rev109",
            "rev108",
            "rev107",
            "rev106",
            "rev105",
            "rev102",
            "rev101",
            "rev100",
            "rev99",
            "rev98",
            "rev97",
            "rev96",
            "rev95",
            "rev94",
            "rev93",
            "rev92",
            "rev91",
            "rev90",
            "rev88",
            "rev87",
            "rev86",
            "rev85",
            "rev84",
            "rev83",
            "rev82",
            "rev81",
            "rev80",
            "rev79",
            "rev78",
            "rev77",
            "rev76",
            "rev75",
            "rev65",
            "rev64",
            "rev63",
            "rev62",
            "rev61",
            "rev60",
            "rev58",
            "rev52",
            "rev51",
            "rev50",
            "rev49",
            "rev48",
            "rev47",
            "rev46",
            "rev45",
            "rev44",
            "rev43",
            "rev42",
            "rev41",
            "rev40",
            "rev39",
            "rev38",
            "rev37",
            "rev36",
            "rev35",
            "rev34",
            "rev33",
            "rev32",
            "rev31",
            "rev30",
            "rev29",
            "rev28",
            "rev27",
            "rev26",
            "rev25",
            "rev24",
            "rev23",
            "rev22",
            "rev21",
            "rev20",
            "rev19",
            "rev18",
            "rev17",
            "rev16",
            "rev15",
            "rev14",
            "rev5",
            "rev4",
            "rev337",
            "rev336",
            "rev335",
            "rev334",
            "rev333",
            "rev332",
            "rev331",
            "rev330",
            "rev329",
            "rev328",
            "rev327",
            "rev326",
            "rev325",
            "rev324",
            "rev323",
            "rev322",
            "rev321",
            "rev320",
            "rev319",
            "rev318",
            "rev317",
            "rev316",
            "rev315",
            "rev314",
            "rev313",
            "rev312",
            "rev308",
            "rev307",
            "rev306",
            "rev305",
            "rev303",
            "rev302",
            "rev301",
            "rev300",
            "rev299",
            "rev298",
            "rev297",
            "rev296",
            "rev295",
            "rev294",
            "rev293",
            "rev292",
            "rev291",
            "rev290",
            "rev289",
            "rev288",
            "rev287",
            "rev286",
            "rev285",
            "rev284",
            "rev283",
            "rev282",
            "rev281",
            "rev280",
            "rev279",
            "rev278",
            "rev277",
            "rev276",
            "rev275",
            "rev274",
            "rev273",
            "rev272",
            "rev271",
            "rev270",
            "rev269",
            "rev268",
            "rev267",
            "rev266",
            "rev265",
            "rev264",
            "rev263",
            "rev261",
            "rev259",
            "rev257",
            "rev255",
            "rev253",
            "rev251",
            "rev249",
            "rev247",
            "rev245",
            "rev243",
            "rev242",
            "rev240",
            "rev239",
            "rev237",
            "rev238",
            "rev236",
            "rev234",
            "rev232",
            "rev231",
            "rev230",
            "rev229",
            "rev228",
            "rev227",
            "rev223",
            "rev222",
            "rev221",
            "rev216",
            "rev168",
            "rev164",
            "rev162",
            "rev160",
            "rev158",
            "rev154",
            "rev151",
            "rev143",
            "rev142",
            "rev141",
            "rev140",
            "rev139",
            "rev135",
            "rev134",
            "rev133",
            "rev131",
            "rev130",
            "rev129",
            "rev128",
            "rev126",
            "rev125",
            "rev124",
            "rev117",
            "rev116",
            "rev115",
            "rev104",
            "rev103",
            "rev89",
            "rev73",
            "rev72",
            "rev71",
            "rev70",
            "rev69",
            "rev68",
            "rev67",
            "rev66"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-24375.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:37.583132595Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/24xxx/CVE-2025-24375.json",
        "https://github.com/canonical/mysql-k8s-operator/security/advisories/GHSA-g83v-7694-2hf7",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-24375",
        "https://github.com/canonical/mysql-k8s-operator/commit/7c6b1206fcbc7324b72f413c5e63216e742a71a1",
        "https://github.com/canonical/mysql-k8s-operator/pull/553",
        "https://github.com/canonical/mysql-operator/commit/1fb61c1ee3e396cdce13d5e8155f2f32a860f89e",
        "https://github.com/canonical/mysql-operator/pull/579"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-256"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/24xxx/CVE-2025-24375.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-24375",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 504714,
  "published_at": "2025-04-09T22:21:37.858+00:00"
}