{"answers":{"affected":"2 open source packages ship an affected version, including mofh.","exploited":"There is no known exploitation of GHSA-7r9x-qrpr-3cxw in the wild and no public exploit code.","fix":"Upgrade mofh to 1.0.1 or later.","what":"GHSA-7r9x-qrpr-3cxw is a vulnerability in mofh, published on 11 Aug 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-7r9x-qrpr-3cxw and fix it if it is affected.\n\nWhat it is: GHSA-7r9x-qrpr-3cxw is a vulnerability in mofh, published on 11 Aug 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-7r9x-qrpr-3cxw in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- mofh (PyPI): affected all versions; fixed in 1.0.1\n- mofh (PyPI): affected all versions; fixed in 1.0.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-7r9x-qrpr-3cxw/ (Markdown: https://insights.sbomify.com/GHSA-7r9x-qrpr-3cxw/index.md)","id":"GHSA-7r9x-qrpr-3cxw","markdown":"https://insights.sbomify.com/GHSA-7r9x-qrpr-3cxw/index.md","name":"GHSA-7r9x-qrpr-3cxw","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":true,"product_category":"Python XML library","requires_auth":"none","summary":"An attacker can cause denial of service via XML entity expansion attacks if a custom API URL is used or the API is compromised.","user_interaction":"not_required","vuln_class":"xxe"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"The `xml.etree.ElementTree` module that mofh used up until version `1.0.1` implements a simple and efficient API for parsing and creating XML data. But it makes the application vulnerable to:\n\n- [Billion Laughs attack](https://en.wikipedia.org/wiki/Billion_laughs_attack): It is a type of denial-of-service attack aimed at XML parsers. It uses multiple levels of nested entities. If one large entity is repeated with a couple of thousand chars repeatedly, the parser gets overwhelmed.  \n- [Quadratic blowup attack](https://www.acunetix.com/vulnerabilities/web/xml-quadratic-blowup-denial-of-service-attack/): It is similar to a Billion Laughs attack. It abuses entity expansion, too. Instead of nested entities, it repeats one large entity with a couple of thousand chars repeatedly.\n\nThe Problem has been patched starting from version `1.0.1` by utilising the `defusedxml` package instead of `xml.etree.ElementTree`.\n\n### Workarounds\nFor this vulnerability to be exploited the user must be using a custom API URL, which has to be manually given using the `api_url` argument, or MyOwnFreeHost's API must be hacked. So, if the user did not use a custom API URL they _should_ be fine, however, upgrading is still advised.\n\nAnother workaround could be to call `defusedxml.defuse_stdlib()` before making any requests using the client.","ecosystems":["PyPI"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"mofh Vulnerable to Improper Restriction of XML External Entity Reference","id":"GHSA-7r9x-qrpr-3cxw","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"xxe","year":"2022"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"PyPI","fixed":["1.0.1"],"introduced":["0"],"last_affected":[],"package":"mofh","purl":null,"source":"GHSA-7r9x-qrpr-3cxw"},{"ecosystem":"PyPI","fixed":["1.0.1"],"introduced":["0"],"last_affected":[],"package":"mofh","purl":"pkg:pypi/mofh","source":"GHSA-7r9x-qrpr-3cxw"}],"products":null,"published":"2022-08-11","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"An attacker can cause denial of service via XML entity expansion attacks if a custom API URL is used or the API is compromised.","url":"https://insights.sbomify.com/GHSA-7r9x-qrpr-3cxw/"}