{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-31630 in the wild and no public exploit code.","fix":"No fix has been published for CVE-2021-31630 yet. Limit exposure of the affected software until one is available.","what":"CVE-2021-31630 is a high-severity command injection vulnerability in n/a, published on 3 Aug 2021. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-31630 and fix it if it is affected.\n\nWhat it is: CVE-2021-31630 is a high-severity command injection vulnerability in n/a, published on 3 Aug 2021. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-31630 in the wild and no public exploit code.\n\nAffected product: n/a. No package-level version data is available, so check the vendor advisory linked from the reference page.\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-31630/ (Markdown: https://insights.sbomify.com/CVE-2021-31630/index.md)","id":"CVE-2021-31630","markdown":"https://insights.sbomify.com/CVE-2021-31630/index.md","name":"CVE-2021-31630","record":{"aliases":["GHSA-2c27-grr5-3w2g"],"analysis":{"component_type":"ics_ot","fix_type":"no_fix_stated","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Open PLC Webserver","requires_auth":"low_privilege","summary":"Remote attackers can execute arbitrary code via the Hardware Layer Code Box component in Open PLC Webserver v3.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"openplc_v3_firmware","vendor":"openplcproject"}],"cvss":{"score":8.8,"severity":"high","source":"nvd","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"description":"Command Injection in Open PLC Webserver v3 allows remote attackers to execute arbitrary code via the \"Hardware Layer Code Box\" component on the \"/hardware\" page of the application.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":"2021-08-02","github_poc":12,"max_poc_stars":22,"metasploit":0,"nuclei":0,"refs":[{"date":"2024-03-28T21:31:45Z","kind":"github_poc","ref":"https://github.com/thewhiteh4t/cve-2021-31630","stars":22,"title":"Python script for exploiting command injection in Open PLC Webserver v3"},{"date":"2024-03-20T22:02:53Z","kind":"github_poc","ref":"https://github.com/Hunt3r0x/CVE-2021-31630-HTB","stars":9,"title":"proof of Concept (PoC) exploit for CVE-2021-31630, targeting the OpenPLC service running on the WifineticTwo box on the Hack The Box platform."},{"date":"2025-06-23T21:54:55Z","kind":"github_poc","ref":"https://github.com/machevalia/OpenPLC-CVE-2021-31630-RCE","stars":3,"title":null},{"date":"2021-08-02T04:48:24Z","kind":"github_poc","ref":"https://github.com/hev0x/CVE-2021-31630-OpenPLC_RCE","stars":2,"title":"Exploit for Authenticated Remote Code Execution on OpenPLC v3 Webserver"},{"date":"2024-06-21T22:10:49Z","kind":"github_poc","ref":"https://github.com/adibna/cve-2021-31630","stars":1,"title":"This is a automation of cve-2021-31630 exploitation"},{"date":"2024-04-04T15:12:57Z","kind":"github_poc","ref":"https://github.com/behindsecurity/htb-wifinetictwo-exploit","stars":0,"title":"A simple python script to exploit CVE-2021-31630 on HTB WifineticTwo CTF"},{"date":"2024-04-15T16:55:30Z","kind":"github_poc","ref":"https://github.com/mind2hex/CVE-2021-31630-OpenPLC-3-Authenticated-RCE","stars":0,"title":"OpenPLC 3 WebServer Authenticated Remote Code Execution."},{"date":"2024-06-04T00:44:47Z","kind":"github_poc","ref":"https://github.com/junnythemarksman/CVE-2021-31630","stars":0,"title":"Modified the PoC CVE-2021-31630 script by Fellipe Oliveira for HTB "}],"tier":"poc_unverified"},"has_fix":null,"headline":"Command injection in n/a","id":"CVE-2021-31630","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"command_injection","year":"2021"},"n_packages":0,"n_references":2,"next":{"headline":"Cross-site request forgery in n/a","id":"CVE-2021-31631"},"packages":[],"prev":{"headline":"Memory corruption in n/a","id":"CVE-2021-31627"},"products":["n/a"],"published":"2021-08-03","related":[{"cvss_score":9.2,"headline":"Initialization of a resource with an insecure default in OpenPLC_V3","id":"CVE-2026-28205","kev_date_added":null,"published":"2026-04-09"},{"cvss_score":9.2,"headline":"Plaintext storage of a password in OpenPLC_V3","id":"CVE-2026-35556","kev_date_added":null,"published":"2026-04-09"},{"cvss_score":9,"headline":"Memory corruption in OpenPLC v3","id":"CVE-2024-34026","kev_date_added":null,"published":"2024-09-18"},{"cvss_score":8.7,"headline":"Missing Authorization in OpenPLC_V3","id":"CVE-2026-35063","kev_date_added":null,"published":"2026-04-09"},{"cvss_score":7.5,"headline":"Denial of service in OpenPLC v3","id":"CVE-2024-36980","kev_date_added":null,"published":"2024-09-18"},{"cvss_score":7.5,"headline":"Denial of service in OpenPLC v3","id":"CVE-2024-36981","kev_date_added":null,"published":"2024-09-18"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"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)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["n/a"]},"summary":"Remote attackers can execute arbitrary code via the Hardware Layer Code Box component in Open PLC Webserver v3.","url":"https://insights.sbomify.com/CVE-2021-31630/"}