{"answers":{"affected":"2 open source packages ship an affected version, including Flask-Security-Too and flask-security-too.","exploited":"There is no known exploitation of GHSA-fxq4-r6mr-9x64 in the wild and no public exploit code.","fix":"Upgrade Flask-Security-Too to 3.4.5 or later.","what":"GHSA-fxq4-r6mr-9x64 is a vulnerability in Flask-Security-Too, published on 8 Apr 2021. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-fxq4-r6mr-9x64 and fix it if it is affected.\n\nWhat it is: GHSA-fxq4-r6mr-9x64 is a vulnerability in Flask-Security-Too, published on 8 Apr 2021. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-fxq4-r6mr-9x64 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- Flask-Security-Too (PyPI): affected from 3.2.0; fixed in 3.4.5\n- flask-security-too (PyPI): affected from 3.2.0; fixed in 3.4.5\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/GHSA-fxq4-r6mr-9x64/ (Markdown: https://insights.sbomify.com/GHSA-fxq4-r6mr-9x64/index.md)","id":"GHSA-fxq4-r6mr-9x64","markdown":"https://insights.sbomify.com/GHSA-fxq4-r6mr-9x64/index.md","name":"GHSA-fxq4-r6mr-9x64","record":{"aliases":[],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["security_bypass","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"Python web application","requires_auth":"low_privilege","summary":"A CSRF vulnerability allows attackers to steal two-factor authentication QR codes during user setup, potentially leading to account takeover.","user_interaction":"required","vuln_class":"csrf"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\nWhen a user is setting up two-factor authentication using an authenticator app, a QRcode is generated and made available via a GET request to /tf-qrcode. Since GETs do not have any CSRF protection, it is possible a malicious 3rd party could access the QRcode and therefore gain access to two-factor authentication codes. Note that the /tf-qrcode endpoint is ONLY accessible while the user is initially setting up their device. Once setup is complete, there is no vulnerability.\n\n### Patches\nThis is fixed in the upcoming 4.0.0 release.\n\n### Workarounds\nYou can provide your own URL for fetching the QRcode by defining SECURITY_TWO_FACTOR_QRCODE_URL and providing your own implementation (that presumably required a POST with CSRF protection). This would require changing the two-factor setup template as well.\n\n### References\nNone.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Read this pull request: #423","ecosystems":["PyPI"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"CSRF Vuln can expose user's QRcode","id":"GHSA-fxq4-r6mr-9x64","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"csrf","year":"2021"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"PyPI","fixed":["3.4.5"],"introduced":["3.2.0"],"last_affected":[],"package":"Flask-Security-Too","purl":null,"source":"GHSA-fxq4-r6mr-9x64"},{"ecosystem":"PyPI","fixed":["3.4.5"],"introduced":["3.2.0"],"last_affected":[],"package":"flask-security-too","purl":"pkg:pypi/flask-security-too","source":"GHSA-fxq4-r6mr-9x64"}],"products":null,"published":"2021-04-08","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"A CSRF vulnerability allows attackers to steal two-factor authentication QR codes during user setup, potentially leading to account takeover.","url":"https://insights.sbomify.com/GHSA-fxq4-r6mr-9x64/"}