{"id":"CVE-2022-24880","aliases":["CVE-2022-24880","GHSA-7r87-cj48-wj45","PYSEC-2022-193"],"related":[],"kind":"vulnerability","state":"published","title":"Potential Captcha Validate Bypass in flask-session-captcha","summary":"flask-session-captcha is a package which allows users to extend Flask by adding an image based captcha stored in a server side session. In versions prior to 1.2.1, he `captcha.validate()` function would return `None` if passed no value (e.g. by submitting an having an empty form). If implementing users were checking the return value to be **False**, the captcha verification check could be bypassed. Version 1.2.1 fixes the issue. Users can workaround the issue by not explicitly checking that the value is False. Checking the return value less explicitly should still work.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"flask-session-captcha is a package which allows users to extend Flask by adding an image based captcha stored in a server side session. In versions prior to 1.2.1, he `captcha.validate()` function would return `None` if passed no value (e.g. by submitting an having an empty form). If implementing users were checking the return value to be **False**, the captcha verification check could be bypassed. Version 1.2.1 fixes the issue. Users can workaround the issue by not explicitly checking that the value is False. Checking the return value less explicitly should still work.","source":"cvelist"},{"lang":"en","text":"### 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)","format":"markdown","source":"ghsa"},{"lang":"es","text":"flask-session-captcha es un paquete que permite a usuarios ampliar Flask al añadir un captcha basado en una imagen almacenada en una sesión del lado del servidor. En versiones anteriores a 1.2.1, la función \"captcha.validate()\" devolvía \"None\" si no le es pasado ningún valor (por ejemplo, al enviar un formulario vacío). Si usuarios implementadores comprobaban que el valor de retorno era **False**, la comprobación del captcha podía omitirse. La versión 1.2.1 corrige el problema. Los usuarios pueden mitigar el problema al no comprobar explícitamente que el valor es False. Comprobar el valor de retorno de forma menos explícita debería seguir funcionando","source":"nvd"}],"published":"2022-04-25T22:10:13.000Z","modified":"2026-06-17T04:32:43.140Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:P/A:N","score":5,"rating":"MEDIUM"}],"cwes":["CWE-253","CWE-394","CWE-754"],"affected":[{"ranges":[{"version":"< 1.2.1","status":"affected"}],"vendor":"Tethik","product":"flask-session-captcha","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.2.1"}],"ecosystem":"PyPI","package":"flask-session-captcha","purl":"pkg:pypi/flask-session-captcha","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.2.1"}],"vendor":"flask-session-captcha_project","product":"flask-session-captcha","cpe":"cpe:2.3:a:flask-session-captcha_project:flask-session-captcha:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"2811ae23a38d33b620fb7a07de8837c6d65c13e4"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.2.1"}],"ecosystem":"PyPI","package":"flask-session-captcha","purl":"pkg:pypi/flask-session-captcha","repo":"https://github.com/Tethik/flask-session-captcha","source":"pysec"}],"references":[{"url":"https://github.com/Tethik/flask-session-captcha/security/advisories/GHSA-7r87-cj48-wj45","tags":["advisory","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/Tethik/flask-session-captcha/pull/27","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/Tethik/flask-session-captcha/commit/2811ae23a38d33b620fb7a07de8837c6d65c13e4","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/Tethik/flask-session-captcha/releases/tag/v1.2.1","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24880","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/Tethik/flask-session-captcha","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/flask-session-captcha/PYSEC-2022-193.yaml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2025-04-23T15:55:15.375Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-24880","url":"https://www.cve.org/CVERecord?id=CVE-2022-24880","licence":"CVE Terms of Use","modified":"2025-04-23T18:32:31.559Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7r87-cj48-wj45","url":"https://github.com/advisories/GHSA-7r87-cj48-wj45","licence":"CC-BY-4.0","modified":"2025-02-21T05:28:13.664Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-24880","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24880","licence":"Public domain","modified":"2026-06-17T04:32:43.140Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2022-193","url":"https://osv.dev/vulnerability/PYSEC-2022-193","licence":"CC-BY-4.0","modified":"2023-11-08T04:08:39.356Z"}],"updatedAt":"2026-11-25T22:58:11.242Z","epss":{"score":0.01206,"percentile":0.69177,"date":"2026-12-01T12:00:22.000Z"}}