{"id":22799835,"url":"https://github.com/chocapikk/cve-2022-40684","last_synced_at":"2025-10-03T15:30:00.227Z","repository":{"id":133506543,"uuid":"552028942","full_name":"Chocapikk/CVE-2022-40684","owner":"Chocapikk","description":"Fortinet Critical Authentication Bypass Vulnerability (CVE-2022-40684) [ Mass Exploit ]","archived":false,"fork":false,"pushed_at":"2022-10-19T16:27:16.000Z","size":14,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-12T07:10:04.172Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Chocapikk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-10-15T16:51:25.000Z","updated_at":"2024-10-11T04:59:31.000Z","dependencies_parsed_at":"2023-11-13T11:28:16.237Z","dependency_job_id":"825c3d2d-7997-4ea7-b603-53521471f604","html_url":"https://github.com/Chocapikk/CVE-2022-40684","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chocapikk%2FCVE-2022-40684","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chocapikk%2FCVE-2022-40684/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chocapikk%2FCVE-2022-40684/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chocapikk%2FCVE-2022-40684/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Chocapikk","download_url":"https://codeload.github.com/Chocapikk/CVE-2022-40684/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237381413,"owners_count":19300927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-12T07:10:06.550Z","updated_at":"2025-10-03T15:29:55.197Z","avatar_url":"https://github.com/Chocapikk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CVE-2022-40684 (CVSS score: 9.6)\nPOC for CVE-2022-40684 affecting Fortinet FortiOS, FortiProxy, and FortiSwitchManager appliances.\n\n## Vulnerable Products\n\n-   FortiOS versions between 7.0.0 – 7.0.6 and 7.2.0 – 7.2.1\n- FortiProxy versions between 7.0.0 – 7.0.6 and version 7.2.0\n- FortiSwitchManager versions 7.0.0 and 7.2.0\n\n## Resource\n\nhttps://socradar.io/what-do-you-need-to-know-about-fortinet-critical-authentication-bypass-vulnerability-cve-2022-40684/\n\n## Summary\nThis POC abuses the authentication bypass vulnerability to set an SSH key for the specified user.\n\n## Usage\n```plaintext\nroot@kali:~# python exploit.py -h\n \n     ______           __  _            __     ____  ____________\n    / ____/___  _____/ /_(_)___  ___  / /_   / __ \\/ ____/ ____/\n   / /_  / __ \\/ ___/ __/ / __ \\/ _ \\/ __/  / /_/ / /   / __/   \n  / __/ / /_/ / /  / /_/ / / / /  __/ /_   / _, _/ /___/ /___   \n /_/    \\____/_/   \\__/_/_/ /_/\\___/\\__/  /_/ |_|\\____/_____/ \n\n\n    CVE-2022-40684 Exploit By Valentin Lobstein (Chocapikk)\n\n\nusage: exploit.py [-h] [-k KEY] [-u URL] [-l LIST] [-U USERNAME] [-t THREADS] [-o OUTPUT]\n\noptions:\n  -h, --help            show this help message and exit\n  -k KEY, --key KEY     Your SSH pubKey id_rsa.pub\n  -u URL, --url URL     Base target uri (ex. http://target-uri/)\n  -l LIST, --list LIST  List of targets (list.txt)\n  -U USERNAME, --username USERNAME\n                        Username\n  -t THREADS, --threads THREADS\n                        Threads\n  -o OUTPUT, --output OUTPUT\n                        Output file\n```\n\n## Zoomeye Dork\n\n```plaintext\n\ntitle:\"FortiGate\"\n\n```\n\n\n## Mitigations\nUpdate to the latest version or mitigate by following the instructions within the Fortinet PSIRT\n* https://www.fortiguard.com/psirt/FG-IR-22-377\n\n\n## Disclaimer\nThis software has been created purely for the purposes of academic research and for the development of effective defensive techniques, and is not intended to be used to attack systems except where explicitly authorized. Project maintainers are not responsible or liable for misuse of the software. Use responsibly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchocapikk%2Fcve-2022-40684","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchocapikk%2Fcve-2022-40684","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchocapikk%2Fcve-2022-40684/lists"}