mal-2025-191782
Vulnerability from ossf_malicious_packages
Published
2025-08-01 15:57
Modified
2025-12-31 02:45
Summary
Malicious code in loggerex (PyPI)
Details

-= Per source details. Do not edit below this line.=-

Source: kam193 (7a27ca3e673f54a1e041d55e84b8a0e871239df2331c9a3fd1dbe20d1fa86f56)

It's a clone of "loguru" package which on import loads a second-stage script from loguru[.]guru. This makes a few checks and downloads the next stage, which is a code obfuscated with PyArmor with unclear behaviour.

The way the malicious code has been embedded could be called a "sophisticated" threat. The code is in the _logger.py in two places: the payload in L2242 as a long string constraint of only whitespaces, which are then transformed into bits and bytes, and later compiled and executed using "types.FunctionType" during initialisation of Core class.


Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers.

Campaign: 2025-07-loquru

Reasons (based on the campaign):

  • typosquatting

  • obfuscation

  • clones-real-package

  • Downloads and executes a remote malicious script.




{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "loggerex"
      },
      "versions": [
        "0.7.4",
        "0.7.6",
        "0.7.5"
      ]
    }
  ],
  "credits": [
    {
      "contact": [
        "https://github.com/kam193",
        "https://bad-packages.kam193.eu/"
      ],
      "name": "Kamil Ma\u0144kowski (kam193)"
    },
    {
      "contact": [
        "https://github.com/kam193",
        "https://bad-packages.kam193.eu/"
      ],
      "name": "Kamil Ma\u0144kowski (kam193)",
      "type": "REPORTER"
    }
  ],
  "database_specific": {
    "iocs": {
      "domains": [
        "loguru.guru"
      ],
      "urls": [
        "https://loguru.guru/version/is_match_revision",
        "https://loguru.guru/version/code"
      ]
    },
    "malicious-packages-origins": [
      {
        "id": "pypi/2025-07-loquru/loggerex",
        "import_time": "2025-12-02T22:30:55.313858062Z",
        "modified_time": "2025-08-01T15:57:37.353166Z",
        "ranges": [
          {
            "events": [
              {
                "introduced": "0"
              }
            ],
            "type": "ECOSYSTEM"
          }
        ],
        "sha256": "3177e123c0555fb064b49aa1a070e749e5358b403c1ff877d70c756950f1b10d",
        "source": "kam193"
      },
      {
        "id": "pypi/2025-07-loquru/loggerex",
        "import_time": "2025-12-02T23:07:18.340590241Z",
        "modified_time": "2025-08-01T15:57:37.353166Z",
        "ranges": [
          {
            "events": [
              {
                "introduced": "0"
              }
            ],
            "type": "ECOSYSTEM"
          }
        ],
        "sha256": "7a27ca3e673f54a1e041d55e84b8a0e871239df2331c9a3fd1dbe20d1fa86f56",
        "source": "kam193"
      },
      {
        "id": "pypi/2025-07-loquru/loggerex",
        "import_time": "2025-12-10T21:38:57.573369848Z",
        "modified_time": "2025-08-01T15:57:37.353166Z",
        "sha256": "bcb53463166fd2bbbd8749db30bbc923dd192ac35348d123548a3ae4a64ac65d",
        "source": "kam193",
        "versions": [
          "0.7.4",
          "0.7.6",
          "0.7.5"
        ]
      },
      {
        "id": "pypi/2025-07-loquru/loggerex",
        "import_time": "2025-12-30T22:39:04.123757641Z",
        "modified_time": "2025-08-01T15:57:37.353166Z",
        "sha256": "77058b0f2ca4f22fe73bd6290136df9a273f4f9473dc8840146776b480d2026e",
        "source": "kam193",
        "versions": [
          "0.7.4",
          "0.7.5",
          "0.7.6"
        ]
      }
    ]
  },
  "details": "\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: kam193 (7a27ca3e673f54a1e041d55e84b8a0e871239df2331c9a3fd1dbe20d1fa86f56)\nIt\u0027s a clone of \"loguru\" package which on import loads a second-stage script from loguru[.]guru. This makes a few checks and downloads the next stage, which is a code obfuscated with PyArmor with unclear behaviour.\n\nThe way the malicious code has been embedded could be called a \"sophisticated\" threat. The code is in the _logger.py in two places: the payload in L2242 as a long string constraint of only whitespaces, which are then transformed into bits and bytes, and later compiled and executed using \"types.FunctionType\" during initialisation of Core class.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2025-07-loquru\n\n\nReasons (based on the campaign):\n\n\n - typosquatting\n\n\n - obfuscation\n\n\n - clones-real-package\n\n\n - Downloads and executes a remote malicious script.\n",
  "id": "MAL-2025-191782",
  "modified": "2025-12-31T02:45:15Z",
  "published": "2025-08-01T15:57:37Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/Delgan/loguru/issues/1363"
    },
    {
      "type": "WEB",
      "url": "https://bad-packages.kam193.eu/pypi/package/loggerex"
    }
  ],
  "schema_version": "1.7.4",
  "summary": "Malicious code in loggerex (PyPI)"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…