{"answers":{"affected":"2 open source packages ship an affected version, including phpservermon/phpservermon. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-4241 exists.","fix":"Upgrade phpservermon/phpservermon to 3.6.0 or later.","what":"CVE-2021-4241 is a low-severity vulnerability in unspecified phpservermon, published on 15 Nov 2022. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-4241 and fix it if it is affected.\n\nWhat it is: CVE-2021-4241 is a low-severity vulnerability in unspecified phpservermon, published on 15 Nov 2022. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-4241 exists.\n\nAffected packages and fixed versions:\n- phpservermon/phpservermon (Packagist): affected all versions; fixed in 3.6.0\n- phpservermon/phpservermon (Packagist): affected all versions; fixed in 3.6.0\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/CVE-2021-4241/ (Markdown: https://insights.sbomify.com/CVE-2021-4241/index.md)","id":"CVE-2021-4241","markdown":"https://insights.sbomify.com/CVE-2021-4241/index.md","name":"CVE-2021-4241","record":{"aliases":["GHSA-hc4j-7mqg-cxjj"],"analysis":{"component_type":"web_application","fix_type":"patch","impacts":["security_bypass"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"phpservermon","requires_auth":"low_privilege","summary":"Attackers can predict session tokens due to a weak random number generator, potentially bypassing authentication in phpservermon.","user_interaction":"not_required","vuln_class":"weak_cryptography"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"VulDB","cpe":[{"product":"php_server_monitor","vendor":"phpservermonitor"}],"cvss":{"score":2.6,"severity":"low","source":"cna","vector":"CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-330","name":"Use of Insufficiently Random Values"},{"id":"CWE-331","name":"Insufficient Entropy"}],"description":"A vulnerability, which was classified as problematic, was found in phpservermon. Affected is the function setUserLoggedIn of the file src/psm/Service/User.php. The manipulation leads to use of predictable algorithm in random number generator. The exploit has been disclosed to the public and may be used. The name of the patch is bb10a5f3c68527c58073258cb12446782d223bc3. It is recommended to apply a patch to fix this issue. The identifier of this vulnerability is VDB-213744.","ecosystems":["Packagist"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"phpservermon User.php setUserLoggedIn predictable algorithm in random number generator","id":"CVE-2021-4241","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"weak_cryptography","year":"2021"},"n_packages":2,"n_references":3,"next":{"headline":"Sapido BR270n/BRC76n/GR297/RB1732 syscmd.htm os command injection","id":"CVE-2021-4242"},"packages":[{"ecosystem":"Packagist","fixed":["3.6.0"],"introduced":["0"],"last_affected":[],"package":"phpservermon/phpservermon","purl":null,"source":"GHSA-hc4j-7mqg-cxjj"},{"ecosystem":"Packagist","fixed":["3.6.0"],"introduced":["0"],"last_affected":[],"package":"phpservermon/phpservermon","purl":"pkg:composer/phpservermon/phpservermon","source":"GHSA-hc4j-7mqg-cxjj"}],"prev":{"headline":"phpservermon User.php generatePasswordResetToken predictable algorithm in random number generator","id":"CVE-2021-4240"},"products":["phpservermon"],"published":"2022-11-15","related":[{"cvss_score":6.5,"headline":"CSRF in PHP Server Monitor before 3.3.2","id":"CVE-2018-18921","kev_date_added":null,"published":"2018-12-18"},{"cvss_score":6.3,"headline":"CRLF Injection in phpservermon/phpservermon","id":"CVE-2021-4097","kev_date_added":null,"published":"2021-12-11"},{"cvss_score":2.6,"headline":"phpservermon User.php generatePasswordResetToken predictable algorithm in random number generator","id":"CVE-2021-4240","kev_date_added":null,"published":"2022-11-15"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-15","vendors":["unspecified"]},"summary":"Attackers can predict session tokens due to a weak random number generator, potentially bypassing authentication in phpservermon.","url":"https://insights.sbomify.com/CVE-2021-4241/"}