mal-2024-12270
Vulnerability from ossf_malicious_packages
Published
2024-10-08 10:29
Modified
2025-12-11 09:27
Summary
Malicious code in fake-usreagant (PyPI)
Details

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

Source: kam193 (ef713dc551a4b2eb9b0c94b270f4c214aa90e688076e15bb263b3bb5f3b8484b)

Package imitates the legitimate fake-useragent, however it has a few suspicious additions: fake.py L149 calls a function from 'urllib2' module, which contains a code attempting to JSON-deserialize encoded code. This is a pickle executing os.system(id), which of course isn't executed by json.loads, but would be by pickle. Also: action is suspicious, not really malicious, but the package is a clear typosquatting attempt.


Category: PROBABLY_PENTEST - Packages looking like typical pentest packages, but also anything that looks like testing, exploring pre-prepared kits, research & co, with clearly low-harm possibilities.

Campaign: 2024-10-old-fake-usreagant

Reasons (based on the campaign):

  • action-hidden-in-lib-usage

  • clones-real-package

  • typosquatting

  • dependency-confusion


{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "fake-usreagant"
      },
      "versions": [
        "0.0.3"
      ]
    }
  ],
  "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": {
    "malicious-packages-origins": [
      {
        "id": "pypi/2024-10-old-fake-usreagant/fake-usreagant",
        "import_time": "2025-12-02T22:30:56.02420032Z",
        "modified_time": "2024-10-08T10:29:47Z",
        "ranges": [
          {
            "events": [
              {
                "introduced": "0"
              }
            ],
            "type": "ECOSYSTEM"
          }
        ],
        "sha256": "de00b37f49e2ff19849cb3269e70e2ad85aefca4a3a84f75aa1ad1bffec9cf3d",
        "source": "kam193"
      },
      {
        "id": "pypi/2024-10-old-fake-usreagant/fake-usreagant",
        "import_time": "2025-12-02T23:07:19.222983563Z",
        "modified_time": "2024-10-08T10:29:47Z",
        "ranges": [
          {
            "events": [
              {
                "introduced": "0"
              }
            ],
            "type": "ECOSYSTEM"
          }
        ],
        "sha256": "ef713dc551a4b2eb9b0c94b270f4c214aa90e688076e15bb263b3bb5f3b8484b",
        "source": "kam193"
      },
      {
        "id": "pypi/2024-10-old-fake-usreagant/fake-usreagant",
        "import_time": "2025-12-10T21:38:58.364758916Z",
        "modified_time": "2024-10-08T10:29:47Z",
        "sha256": "5d26cc05453bac24155479cf8ef3bd0bff5a647bdfec50efdec5e27e634361a1",
        "source": "kam193",
        "versions": [
          "0.0.3"
        ]
      }
    ]
  },
  "details": "\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: kam193 (ef713dc551a4b2eb9b0c94b270f4c214aa90e688076e15bb263b3bb5f3b8484b)\nPackage imitates the legitimate fake-useragent, however it has a few suspicious additions: fake.py L149 calls a function from \u0027urllib2\u0027 module, which contains a code attempting to JSON-deserialize encoded code. This is a pickle executing os.system(id), which of course isn\u0027t executed by json.loads, but would be by pickle. Also: action is suspicious, not really malicious, but the package is a clear typosquatting attempt.\n\n\n---\n\nCategory: PROBABLY_PENTEST - Packages looking like typical pentest packages, but also anything that looks like testing, exploring pre-prepared kits, research \u0026 co, with clearly low-harm possibilities.\n\n\nCampaign: 2024-10-old-fake-usreagant\n\n\nReasons (based on the campaign):\n\n\n - action-hidden-in-lib-usage\n\n\n - clones-real-package\n\n\n - typosquatting\n\n\n - dependency-confusion\n",
  "id": "MAL-2024-12270",
  "modified": "2025-12-11T09:27:53Z",
  "published": "2024-10-08T10:29:47Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://bad-packages.kam193.eu/pypi/package/fake-usreagant"
    }
  ],
  "schema_version": "1.7.4",
  "summary": "Malicious code in fake-usreagant (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 observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…