What it is about
Uses the Buda incident as a starting point to show finance teams how to check who can get into their Odoo before they let an AI agent in: enforce two-factor authentication, keep the built-in login cooldown on and add server-side rate limiting, review external collaborators and stale users, give every API key an expiry, and give the agent its own user with minimal rights and, on Odoo 20, a read-only key. Includes a free read-only audit script, a checklist and prompts.
What it offers, according to the source
Buda says an attacker entered its Odoo accounting system through an external collaborator's account after guessing the password and copied billing data of about 190,000 people in Chile, Colombia and Peru; it found no evidence of access to its trading platform, wallets or funds. In our own test on a fictitious Odoo 20 Community database, the audit script reported 11 HIGH and 4 MEDIUM findings before the fixes and 1 HIGH after them (an external collaborator without an authenticator app).
Mind the evidence. Described by the project’s own documentation or README. It says what the project claims to do and how it is used, not that it works in your case: we have not tested it.
What has really been tested
On 1 December 2026 we read Buda's disclosure, the Cointelegraph and Infobae reports, Odoo's documentation on 2FA, the external API and deployment security, and the Odoo 19.0 and 20.0 source code on GitHub. We installed Odoo 19.0 and Odoo 20.0 Community from the official branches on a test machine, created fictitious users and keys, and checked: password logins over the external API with and without enforced 2FA, the login cooldown in the web form, a read-only API key against a write on Odoo 20, and the audit script over JSON-2 (19 and 20) and XML-RPC (19), with identical results on 19. We have not tested Odoo Online, Odoo.sh, Enterprise or the built-in MCP server, and we have no information on how Buda's Odoo was configured.
How to apply it
On a copy of your database, enforce two-factor authentication, check the login cooldown parameter, archive stale users, review external collaborators and delete keys without expiry. Create a dedicated user for the agent with Invoicing or read-only accounting rights and a key that expires in 30 days or less (read-only on Odoo 20). Run the audit script with a one-day administrator key and connect the agent only with zero HIGH findings. Repeat the audit every month.
- Work on a duplicated test database first, with a one-day API key of a Settings administrator.
- Enforce two-factor authentication in Settings > Permissions (Employees only, or All users if portal users see invoices).
- Check that the system parameter base.login_cooldown_after is not 0 and, on self-hosted Odoo, add fail2ban or proxy rate limiting.
- Review users: archive stale accounts, rename the admin login and give each external collaborator minimum rights, an authenticator app and an end date.
- Delete API keys without expiry and recreate them with an expiry; agent keys 30 days or less.
- Create a dedicated user for the AI agent with Invoicing or read-only accounting rights and, on Odoo 20, a read-only API key.
- Run odoo_agent_access_audit.py and connect the agent only when it reports 0 HIGH; keep the report and repeat it monthly.
In two sentences
On 26 November 2026 the Latin American crypto exchange Buda disclosed that someone had entered its Odoo accounting system with the account of an external collaborator, after guessing the password, and copied billing data of about 190,000 people. If your finance team is about to connect Claude, ChatGPT or another agent to Odoo, that agent becomes one more account in the same database, so this guide shows how to check every door first, with a free script that audits logins, 2FA and API keys in a few seconds.
Why now
Buda’s post is short and unusually candid: the system was separate from its trading platform and held no passwords or balances, but it did hold names, ID numbers, billed fees and, for some customers, e-mail, phone and address. Buda says it blocked the access on 19 November, changed credentials and is adding controls to the system and its passwords. Cointelegraph and Infobae reported it on 30 November.
At the same time, Odoo 20 ships a built-in MCP server, and community servers exist for older versions, so more teams are creating API keys for AI assistants this quarter. “Odoo security”, “odoo api key expiration” and “odoo mcp server” all appear in Google’s suggestions. An agent’s key is exactly the kind of credential that ends up in a laptop configuration file and is forgotten.
The four doors into an Odoo database
We built this table from Odoo’s documentation and code, then tested each row on Odoo 19.0 and 20.0 Community installed from the official GitHub branches.
| Door | What protects it by default | What we saw in our test | What to check |
|---|---|---|---|
| Web login | Password; cooldown of 60 s after 5 failures from one IP | After 5 wrong passwords, the right one was refused with “Too many login failures” | 2FA enforced; cooldown not set to 0; fail2ban or proxy limits for attacks from many IPs |
| External API with a password (XML-RPC, JSON-RPC) | Only the password, unless the user has 2FA | The agent user’s password worked over XML-RPC until 2FA was enforced; then it was refused | Enforce 2FA so only API keys work; XML-RPC and JSON-RPC are deprecated, with removal announced for Odoo 22 |
| API keys (JSON-2 in Odoo 19+) | Expiry chosen at creation; 90-day cap for internal users in the code | The code still offers Settings administrators a key that never expires; on Odoo 20 our key without a scope was refused (401) and one with the “rpc” scope worked | Expiry on every key, 30 days for agents, one-day admin keys for scripts |
| Odoo 20 MCP server | OAuth for internal users or a key with the MCP scope; read-only tools by default | Not tested: it is not in the Community code we installed | Which tools are enabled, the rights of the user behind the connection, and its key in My Preferences > Security |
One more point from the documentation: on Odoo Online, the external API is only available on Custom pricing plans.
Step by step: lock the doors, then let the agent in
- Copy the database. Run everything on a duplicate first. Create a one-day API key for a named Settings administrator; on Odoo 20 choose the RPC scope.
- Enforce two-factor authentication. Settings > Permissions > Enforce two-factor authentication, then Employees only or All users. Ask everyone with accounting rights to use an authenticator app rather than the e-mail code. This is the control that would have made a guessed password insufficient on its own.
- Check the cooldown. In Settings > Technical > System Parameters,
base.login_cooldown_aftermust not be 0. In Odoo 19 the parameter cannot even be deleted, only changed. On your own server, add fail2ban on the “Login failed” log lines, as Odoo’s deployment guide describes, because the built-in counter is per IP and per process. - Review people, not only roles. Archive users who left or have not logged in for 90 days. Rename any administrator whose login is still
admin. For each external collaborator (your outside accountant, an implementation partner, a consultant) confirm they still need access, cut rights to the minimum and write an end date in your access log. - Fix the keys. Delete keys without expiry and keys whose owner nobody can name. Recreate the ones you need with a description and an expiry.
- Create the agent’s user. A dedicated internal user, never an administrator and never Accounting / Administrator, which can change accounts, taxes, journals and lock dates. Start with Invoicing or read-only accounting. On Odoo 20 use Create Read-only API Key: in our test it blocked a draft invoice that the same user could create with a normal key.
- Audit, then connect. Run the script. Connect the agent only when it reports zero HIGH findings, then repeat it every month and after every change of rights.
What our test found
On the fictitious Odoo 20 database (five internal users, one portal user, three keys) the first run returned NO-GO: 11 HIGH, 4 MEDIUM, 2 INFO. The HIGH findings were no enforced 2FA, the cooldown switched off, five users with accounting or admin rights and no 2FA, an external accountant from another domain with posting rights, a key with no expiry and an agent user that was both Settings administrator and Accounting administrator.
After the fixes in step 1 to 6 the second run returned 1 HIGH, 0 MEDIUM, 5 INFO. The remaining HIGH is deliberate: the external collaborator still had posting rights and only the e-mail code, not an authenticator app. That is the profile of the account Buda describes, so the script keeps it as a blocker until a person decides otherwise. On Odoo 19 the same checks gave the same results over JSON-2 and over XML-RPC.
Copy and adapt
Prerequisites: Python 3.9 or later with no extra libraries, an administrator API key that expires in one day and a test copy of your database. Download the kit from /downloads/: odoo_agent_access_audit.py, the before and after reports from our test, the checklist and three prompts. Everything is an Agents Finance template under MIT-0, not published by Odoo or Buda.
Run it like this (keep the key in the environment, never on the command line or in a file under version control):
export ODOO_API_KEY="paste-a-one-day-admin-key"
python3 odoo_agent_access_audit.py --url https://erp.example.com --db mycompany \
--company-domain example.com --agent-login ai-agent@example.com
# Odoo 17/18, through the deprecated XML-RPC API
python3 odoo_agent_access_audit.py --api xmlrpc --login it-admin@example.com \
--url https://erp.example.com --db mycompany --company-domain example.com
# No server at all: checks the logic on built-in fictitious data
python3 odoo_agent_access_audit.py --selftest
The script only reads. It calls search_read on users, groups, system parameters and API keys and writes two files, odoo_access_audit.md and odoo_access_audit.csv; exit code 1 means NO-GO. The heart of the API key check, if you prefer to rebuild it in your own tooling:
keys = api.call('res.users.apikeys', 'search_read', domain=[],
fields=['name', 'user_id', 'scope', 'create_date', 'expiration_date'])
for k in keys:
if not k['expiration_date']:
add('HIGH', 'C08 API key never expires', k['name'],
'Persistent key: if it leaks it works until someone deletes it.',
'Delete it and create a new key with an expiry date.')
The first lines of our “before” report, as the script writes them:
NO-GO: 11 HIGH, 4 MEDIUM, 2 INFO
| HIGH | C01 2FA policy | database | Two-factor authentication is not enforced; a guessed password is enough to log in. |
| HIGH | C02 Login cooldown | database | base.login_cooldown_after = 0: login rate limiting is switched off. |
| HIGH | C04 External collaborator | gestor@asesoria-ejemplo.test | Internal account from another domain (asesoria-ejemplo.test). Rights: Full accounting (can post entries), Invoicing. |
The reports contain logins, which are personal data. If you use the prompts in the kit to turn a report into an action plan, replace the logins with USER-1, USER-2 first.
Limitations and risks
- We do not know Buda’s configuration. Buda has not said which Odoo version it runs, whether 2FA was enforced or how the password was guessed. This guide does not claim that any of these checks would have stopped that attack.
- Community only. We tested Odoo 19 and 20 Community on our own machine. Odoo Online and Odoo.sh manage the server for you, and the Enterprise MCP server was not available to test.
- The script cannot see read-only keys. Odoo marks them in the key itself, which the API does not return. Write it in the key’s description.
- The e-mail code is weaker than an app. With 2FA enforced, users without an authenticator receive a code by e-mail, so a compromised mailbox is enough.
- Code can change. The defaults above come from the 20.0 branch on 1 December 2026; recheck them after each upgrade.
Common mistakes
- Giving the agent the key of the person who set it up, often an administrator.
- Creating a key with no expiry “just for the pilot” and never deleting it.
- Leaving the outside accountant’s user active after the engagement ends.
- Setting the cooldown to 0 to stop a sync job being blocked, instead of giving that job its own API key.
- Pasting the API key into the AI chat to “help it connect”.
Newsletter
We will update this guide when Odoo documents read-only keys, when the MCP server can be tested on a trial database or when Buda publishes more detail. Subscribe to the newsletter to receive the next template: a monthly access review log for every AI agent connected to your ERP.
Frequently asked questions
Does Odoo block brute-force password guessing?
Partly. By default Odoo refuses logins from an IP address for 60 seconds after 5 failed attempts, set by the system parameters base.login_cooldown_after and base.login_cooldown_duration. The counter is kept per source IP and in the memory of each server process, so attempts spread over many addresses are not stopped. Odoo's deployment documentation recommends fail2ban or rate limiting on the proxy for internet-facing servers.
Can I force two-factor authentication for every Odoo user?
Yes. In Settings > Permissions tick Enforce two-factor authentication and choose Employees only or All users (All users also covers portal users). Users without an authenticator app then receive a code by e-mail. In our test, once 2FA was enforced Odoo also stopped accepting the user's password on the external API: only API keys worked.
Do Odoo API keys expire?
Every key has a duration chosen when it is created. Odoo's documentation says keys cannot last more than three months, and in the 19.0 and 20.0 code the internal user role is capped at 90 days. The same code still offers Settings administrators a key with no expiry, so check your existing keys: the audit script flags any key without an expiry date as HIGH.
Can an AI agent get read-only access to Odoo?
On Odoo 20 there is a Create Read-only API Key button in the user's security settings. In our test on Odoo 20 Community, a read-only key could read data but the same request to create a draft invoice failed with a read-only database transaction error, while a normal key for the same user created it. On older versions, limit the agent's user to read-only or Invoicing rights instead.
Sources
- Buda.com blog — Incidente de seguridad en el sistema de contabilidad externo (26 November 2026, page in Spanish) (opens in a new tab) (primary)
- Cointelegraph — Buda says hacker accessed 190K customers' data by guessing password (30 November 2026) (opens in a new tab)
- Infobae — Buda sufrió el robo de datos de 190.000 clientes tras adivinarse una contraseña (30 November 2026, in Spanish) (opens in a new tab)
- Odoo 20.0 documentation — Two-factor authentication (opens in a new tab)
- Odoo 20.0 documentation — External JSON-2 API (API keys) (opens in a new tab)
- Odoo 19.0 documentation — System configuration: security and blocking brute force attacks (opens in a new tab)
- Odoo 20.0 documentation — AI MCP server (opens in a new tab)
- GitHub — odoo/odoo 20.0, res_users.py (login cooldown, API key scopes and durations), commit 4909069 (opens in a new tab)
- GitHub — odoo/odoo 20.0, tools/api_key.py (read-only API keys), commit 4909069 (opens in a new tab)
We wrote this entry in our own words from the sources above and checked that the links worked on December 1, 2026. Is anything incorrect? Tell us.
Share this entry
This entry is part of the guide: AI agents for accounting · MCP for accounting and ERPs