Download Latest Version OpenEstate v0.9.1 -- Cheque Queue Validation Fix source code.zip (2.5 MB)
Home / v0.5.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-09-13 8.5 kB
v0.5.0 -- Security fix_ 2FA bypass and guessable codes source code.tar.gz 2026-09-13 1.6 MB
v0.5.0 -- Security fix_ 2FA bypass and guessable codes source code.zip 2026-09-13 2.0 MB
Totals: 3 Items   3.6 MB 0

v0.5.0 — Security fix: 2FA bypass and guessable codes

This release fixes an authentication vulnerability affecting every tagged release from v0.1.0 through v0.4.0. If two-factor authentication (2FA) is enabled on any staff, customer, or broker account on your install, upgrade to v0.5.0 now. Full advisory: SECURITY.md (github.com) — see "Two-factor authentication bypass and guessable 2FA codes."

What was fixed

A password alone could turn off or take over an account's 2FA. When 2FA is on, signing in is two steps: password, then a six-digit code. After the password step, the server hands out a short-lived token meant only for entering that code. It didn't enforce that — the same token was also accepted by the endpoints that set up, confirm, and disable 2FA, change the password, and sign out every session. Impact: anyone who knew an account's password, but not its 2FA code, could disable that account's 2FA or register their own authenticator in its place, finish signing in, and walk away with the account's new recovery codes — leaving the real owner's authenticator rejected. Staff and customer/broker portal accounts were both affected. All they needed was the password — no code, no device, no prior access.

2FA codes on staff accounts could be guessed by brute force. Staff code entry had no rate limit of its own, and a wrong guess counted toward nothing — so anyone holding a password could keep trying six-digit codes indefinitely. (Portal code entry already had a limit, keyed by network address.)

The fix: the short-lived token is now refused everywhere except the code-entry step — including any endpoint added in the future — and it expires in 5 minutes instead of 15. Code entry on both staff and portal accounts now allows 5 attempts per user per 5 minutes regardless of how many addresses they come from, and 5 wrong codes in a row locks that account's code entry for 5 minutes. We're not walking through how the bug was triggered here — see SECURITY.md if you need the technical detail for your own risk assessment.

Is any action needed beyond upgrading?

No credential rotation and no forced 2FA re-enrolment. The fix doesn't change how TOTP secrets are stored or verified — every existing 2FA enrolment keeps working exactly as it does today. Nothing about this fix requires rotating a password, a TOTP secret, or a session.

Can you check whether your install was actually targeted? No — and we want to be direct about that rather than imply otherwise. We checked the code, not just documented an assumption: the login and 2FA endpoints run through a service that connects to the database without the audit-log extension this project uses everywhere else, so no audit-log row is written for 2FA setup, confirmation, disable, or a password change — on either the staff or the portal side. There's no purpose-built log to go check. If you kept your own web server or application logs from before upgrading, an unusual sequence of totp/setup/totp/confirm calls against an account shortly after a login might be visible there, but this project has no built-in way to surface that for you.

Two separate things, stated separately so one isn't mistaken for the other:

  • The author's own test machines are the only installs this bug is known to have run on, and there's no indication of exploitation there either — both problems were found by code review ahead of this release, not by investigating an incident.
  • Your install is not covered by that statement. The author has no way to know who else has run an affected version, and — per the audit-log gap above — if you have, you have no built-in way to check it either. Don't read the bullet above as reassurance about your own deployment; it says nothing about it either way.

Also in this release

v0.5.0 ships everything merged since v0.4.0, not just the security fix. Highlights — see CHANGELOG.md (github.com), the [0.5.0] section, for the complete list:

  • Docker is gone as an install path, including for tests. Native install (install-native.sh against a PostgreSQL/Redis/nginx you run yourself) has been the only supported production path for a while; the container stack is now removed rather than left to rot untested. If you're still on the old Docker Compose stack, nothing is touched or removed automatically — but it will receive no further updates.
  • Plotted and farmhouse land inventory — projects can now be land-based (priced and booked per acre/guntha, with Sector/Block/Cluster grouping) alongside the existing tower/floor model.
  • A configurable lead-stage pipeline and a new pre-sales reporting suite (10 reports, one filterable screen, CSV export and print gated by their own permissions with audit logging).
  • Minimum password length raised from 8 to 12 characters, everywhere a password is set. This is prospective only — no existing password stops working, and nobody is locked out by upgrading.
  • A rapid-reload/multi-tab session bug that could log you out with no explanation is fixed (a short grace window on refresh-token reuse).
  • Deactivating a user now revokes their sessions immediately instead of leaving up to 15 minutes of continued access.

Upgrading

:::bash
cd /opt/openestate-src/deploy/native
sudo ./upgrade-native.sh --ref v0.5.0

Full procedure (backup, rollback behaviour, troubleshooting): Installation Guide.

This release runs 13 database migrations on upgrade. Several of them add a column to a table that's read on nearly every request — refresh_tokens, inquiries, bookings, and users among them. upgrade-native.sh runs migrations with a lock timeout (MIGRATION_LOCK_TIMEOUT, 15s by default) specifically so that if one of these contends with live traffic, the upgrade aborts cleanly and leaves the previous release running, rather than hanging indefinitely. If you hit that error, retry during a quieter period — nothing is left half-applied.

New optional setting: TOTP_VERIFY_THROTTLE_LIMIT (default 5) — 2FA code attempts allowed per user per 5 minutes. Leave it unset unless you have a specific reason to change it; documented in deploy/native/openestate.env.example.

No intermediate version is required — upgrade-native.sh applies every migration between your current release and this one in order. CI runs this exact upgrade sequence (an older baseline through to this release, which is a superset of what a v0.4.0 install needs — v0.4.0 sits inside that already-exercised range) against a real, previously-customised install on every push; it is not a from-v0.4.0-specifically test, but the 13 migrations this release adds are exercised as part of it.

Known issues

If a user loses both their password and their 2FA device, there is currently no way for an admin to recover their account through the product. reset-admin-password.sh (the break-glass CLI for a locked-out staff admin) resets the password but does not clear 2FA — the user will get a working password back and then be stuck at the code-entry screen. There is no admin-side "disable this user's 2FA" tool yet, self-service or otherwise; today's only recovery path is a direct database update by someone comfortable clearing the relevant columns on the users table themselves. If you're enabling 2FA more broadly after this release, enable it on more than one admin account, or make sure recovery codes are stored somewhere safe — this is exactly the situation that gap bites.

2FA enrolment, disable, and password-change events write no audit row — on either the staff or portal side. Stated plainly, not just above: if you need to determine after the fact whether this vulnerability was actually exploited on your install, there is nothing in the product to check. See "Is any action needed beyond upgrading?" above for the code-level reason. Tracked in docs/todo.md as a security item.

A handful of smaller, related hardening items are tracked and still open — none are new in this release, none block it, and they're listed honestly rather than silently deferred: docs/todo.md's "Auth / rate limiting" section.

Source: README.md, updated 2026-09-13