{"id":"CVE-2022-24880","aliases":["GHSA-7r87-cj48-wj45","PYSEC-2022-193"],"url":"https://o3.security/vulnerability/CVE-2022-24880","summary":"Potential Captcha Validate Bypass in flask-session-captcha","details":"### Impact\nflask-session-captcha is a package which allows users to extend Flask by adding an image based captcha stored in a server side session.\n\nThe `captcha.validate()` function would return `None` if passed no value (e.g. by submitting a request with an empty form).\n\nIf implementing users were checking the return value to be **False**, the captcha verification check could be bypassed.\n\nSample vulnerable code:\n```python\nif captcha.validate() == False:\n    ... # abort\nelse:\n   ... # do stuff\n```\n\n### Patches\nA new version (1.2.1) is available that fixes the issue.\n\n### Workarounds\nUsers can workaround the issue by not explicitly checking that the value is False. \n\nChecking the return value less explicitly should still work. \n\n```python\nif not captcha.validate():\n    ... # abort\nelse:\n   ... # do stuff\n```\n\n```python\nif captcha.validate():\n    ... # do stuff\nelse:\n   ... # abort\n```\n\n### References\nhttps://github.com/Tethik/flask-session-captcha/pull/27\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [the github repo](https://github.com/Tethik/flask-session-captcha)\n","published":"2022-04-25T22:10:13Z","modified":"2026-10-28T02:30:50.734790290Z","cvss":{"score":5.3,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"flask-session-captcha","fixedVersion":"1.2.1"}],"fix":{"url":"https://github.com/Tethik/flask-session-captcha/commit/2811ae23a38d33b620fb7a07de8837c6d65c13e4","label":"Tethik/flask-session-captcha@2811ae2"},"references":[{"type":"WEB","url":"https://github.com/Tethik/flask-session-captcha/releases/tag/v1.2.1"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24880.json"},{"type":"ADVISORY","url":"https://github.com/Tethik/flask-session-captcha/security/advisories/GHSA-7r87-cj48-wj45"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24880"},{"type":"FIX","url":"https://github.com/Tethik/flask-session-captcha/commit/2811ae23a38d33b620fb7a07de8837c6d65c13e4"},{"type":"FIX","url":"https://github.com/Tethik/flask-session-captcha/pull/27"},{"type":"PACKAGE","url":"https://github.com/Tethik/flask-session-captcha"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/flask-session-captcha/PYSEC-2022-193.yaml"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:30:50.734790290Z"}}