---
title: TSU-07 Insecure Custom Authentication in Mendix | Omnext
description: Custom login logic in Mendix fails quietly. Session activation before the last check, unvalidated tokens, weak secrets, and how to check the flow.
image: https://www.omnext.com/hubfs/raw_assets/public/Cerios%20Solutions%20Theme%20-%20Omnext/omx-sept-2026/images/omx-og-default.png
---

[![Omnext](https://www.omnext.com/hubfs/Omnext/Omnext%20-%20Logo%20+%20Slogan.svg)](https://www.omnext.com?hsLang=en)

[Platform](https://www.omnext.com/mendix-quality-analysis?hsLang=en)

[Mendix quality analysisMaintainability, architecture and technical debt, scored every sprint.](https://www.omnext.com/mendix-quality-analysis?hsLang=en)[Mendix security analysisThe S-Unit Top 10, checked automatically on every build.](https://www.omnext.com/mendix-security-analysis?hsLang=en)[DevAssist for Studio ProFindings in the IDE, while the developer is still in the model.](https://www.omnext.com/devassist?hsLang=en)[Omnext MCPAll analysis data, ready for your AI agents and assistants.](https://www.omnext.com/omnext-mcp?hsLang=en)

[Pricing](https://www.omnext.com/pricing?hsLang=en)

[Resources](https://www.omnext.com/resources?hsLang=en)

[Knowledge baseThe full product documentation, for everyone who works with Omnext.](https://help.omnext.com/?hsLang=en)[Fact sheetsQuality and security analysis for Mendix, in two short PDFs.](https://www.omnext.com/fact-sheet-request?hsLang=en)[Mendix security self-assessmentTen questions, five minutes, your security profile on screen.](https://www.omnext.com/mendix-security-self-assessment?hsLang=en)[CoE Maturity ScanWhere your Center of Excellence stands today.](https://www.omnext.com/en/coe-maturity-scan?hsLang=en)[NIS2 readiness checklistTwenty-four items, your readiness score on screen.](https://www.omnext.com/nis2-readiness-checklist-mendix?hsLang=en)[The S-Unit Top 10Ten Mendix-specific security categories, explained.](https://www.omnext.com/s-unit-top-10?hsLang=en)[BlogArticles on Mendix quality, security and governance.](https://www.omnext.com/blog?hsLang=en)[Trust CenterHosting, data handling and certifications.](https://www.omnext.com/trust-center?hsLang=en)[All resourcesEverything in one overview.](https://www.omnext.com/resources?hsLang=en)

[Partners](https://www.omnext.com/partners?hsLang=en)[Contact](https://www.omnext.com/contact?hsLang=en)

Search

[Log in](https://portal.omnext.net/)[Request a demo](https://www.omnext.com/demo?hsLang=en) Menu

[Platform](https://www.omnext.com/mendix-quality-analysis?hsLang=en)[Mendix quality analysis](https://www.omnext.com/mendix-quality-analysis?hsLang=en)[Mendix security analysis](https://www.omnext.com/mendix-security-analysis?hsLang=en)[DevAssist for Studio Pro](https://www.omnext.com/devassist?hsLang=en)[Omnext MCP](https://www.omnext.com/omnext-mcp?hsLang=en)[Pricing](https://www.omnext.com/pricing?hsLang=en)[Resources](https://www.omnext.com/resources?hsLang=en)[Knowledge base](https://help.omnext.com/?hsLang=en)[Fact sheets](https://www.omnext.com/fact-sheet-request?hsLang=en)[Mendix security self-assessment](https://www.omnext.com/mendix-security-self-assessment?hsLang=en)[CoE Maturity Scan](https://www.omnext.com/en/coe-maturity-scan?hsLang=en)[NIS2 readiness checklist](https://www.omnext.com/nis2-readiness-checklist-mendix?hsLang=en)[The S-Unit Top 10](https://www.omnext.com/s-unit-top-10?hsLang=en)[Blog](https://www.omnext.com/blog?hsLang=en)[Trust Center](https://www.omnext.com/trust-center?hsLang=en)[All resources](https://www.omnext.com/resources?hsLang=en)[Partners](https://www.omnext.com/partners?hsLang=en)[Contact](https://www.omnext.com/contact?hsLang=en)

[Request a demo](https://www.omnext.com/demo?hsLang=en)[Log in](https://portal.omnext.net/)

S-Unit Top 10 · TSU-07

# Insecure custom authentication

Authentication is difficult to get right, and Mendix offers several places to replace or extend it. A custom mechanism that is subtly wrong does not fail loudly; it simply lets the wrong person in, or lets the right person skip a step that was there for a reason.

[Take the free security self-check](https://www.omnext.com/mendix-security-self-assessment?hsLang=en)[All ten categories](https://www.omnext.com/s-unit-top-10?hsLang=en)

Where it goes wrong

## How this shows up in a Mendix application.

### A session active too early

The session starts before every step has passed, which is exactly how multi-factor authentication gets skipped.

### Authentication in a navigation microflow

Login logic in the flow that renders the page, running inside a session that already exists rather than an anonymous one.

### The standard login left reachable

The custom path is added but the platform login still works, so the new behaviour is optional for anyone who knows the URL.

### Tokens validated only on identity

A JWT or SAML assertion is read for who it claims to be, while expiry, issuer, audience and signature go unchecked.

### Identity from claims the user controls

Mapping the account from a value the user can influence, which turns identification into a text field.

### No brute-force protection

One-time codes and custom password checks with no lockout, so guessing is a matter of patience.

Impact

## What it lets someone do.

Every item below has been found in production applications. None of them requires a sophisticated attacker: they require somebody who reads the page source, edits a request or simply logs in.

Log in as somebody else, or skip the second factor entirely

Brute-force a one-time code or a custom password check

Forge or replay a token where the signature is never verified

Mint valid tokens with a predictable secret, or one reused from a test environment

Prevention

## How to keep it out.

### Do not invent, and do not rebuild

Use maintained Marketplace modules or standard libraries rather than implementing a protocol by hand.

### Finish authenticating before the session starts

All steps complete with no session or an anonymous one, and the standard login listener replaced so the custom path cannot be sidestepped.

### Validate every claim, rotate every secret

Expiry, issuer, audience and signature, with cryptographically strong keys that differ per environment.

Automated

## What Omnext checks for you.

Omnext checks the settings that custom authentication tends to weaken: the password policy, the hash algorithm, the default administrator account, demo users, multiple sessions per user, anonymous access, and basic authentication on published services that runs without an active session.

[See the security analysis](https://www.omnext.com/mendix-security-analysis?hsLang=en)

Source

## The framework is The S-Unit's.

The S-Unit Top 10 is the work of The S-Unit, the Mendix security specialists. They built it from more than ten years of offensive security work and hundreds of Mendix penetration tests, and they maintain the canonical version. Omnext automates the checks in the Security Analysis module; the framework itself is theirs, and this page explains it in our own words.

[Read the original on the-s-unit.nl](https://the-s-unit.nl/en/tsu-07-insecure-custom-authentication/)

Keep reading

## The rest of the S-Unit Top 10.

Ten categories in total. [See the full list](https://www.omnext.com/s-unit-top-10?hsLang=en).

[TSU-06Outdated or end-of-life components](https://www.omnext.com/tsu-06-outdated-or-end-of-life-components?hsLang=en) [TSU-08Insecure custom Java](https://www.omnext.com/tsu-08-insecure-custom-java?hsLang=en)

Next step

## Which of the ten are you sure about?

Ten questions, about five minutes, results on screen. Or let the scan answer all ten with evidence from your own model.

[Take the self-check](https://www.omnext.com/mendix-security-self-assessment?hsLang=en)[Request a demo](https://www.omnext.com/demo?hsLang=en)

![Omnext](https://www.omnext.com/hubfs/Omnext/Omnext%20-%20Logo%20-%20Inverted.svg)

Automated quality and security analysis for Mendix. Build Fast. Stay in Control.

ISO 27001:2023GDPRHosted on Azure (EU)

Platform[Quality Analysis for Mendix](https://www.omnext.com/mendix-quality-analysis?hsLang=en)[Security Analysis (SAST)](https://www.omnext.com/mendix-security-analysis?hsLang=en)[DevAssist for Studio Pro](https://www.omnext.com/devassist?hsLang=en)[Omnext MCP](https://www.omnext.com/omnext-mcp?hsLang=en)[Pricing](https://www.omnext.com/pricing?hsLang=en)

Resources[Fact sheets](https://www.omnext.com/fact-sheet-request?hsLang=en)[Security Self-Assessment](https://www.omnext.com/mendix-security-self-assessment?hsLang=en)[CoE Maturity Scan](https://www.omnext.com/en/coe-maturity-scan?hsLang=en)[Blog](https://www.omnext.com/blog?hsLang=en)[Knowledge base](https://help.omnext.com/?hsLang=en)[All resources](https://www.omnext.com/resources?hsLang=en)

Company[Partners](https://www.omnext.com/partners?hsLang=en)[Trust Center](https://www.omnext.com/trust-center?hsLang=en)[Contact](https://www.omnext.com/contact?hsLang=en)[Request a demo](https://www.omnext.com/demo?hsLang=en)

ContactCerios | Omnext B.V.  
Orteliuslaan 1000  
3528 BD Utrecht, The Netherlands[contact@omnext.com](mailto:contact@omnext.com)[LinkedIn](https://www.linkedin.com/company/omnext/)

© 2026 Cerios | Omnext B.V. · part of Cerios Solutions · KvK 09115372[Privacy policy](https://www.omnext.com/privacy-policy?hsLang=en)[Security & disclosure](https://www.omnext.com/trust-center?hsLang=en)