Bug #122045 MySQL Workbench 26.10.1 fails to launch when PowerShell Constrained Language Mode is enforced by AppLocker

Submitted: 3 Dec 10:47
Reporter: Romo Ltd Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:26.10.1 OS:Windows (Windows 11 Enterprise, 10.0.26300)
Assigned to: CPU Architecture:x86 (11th Gen Intel(R) Core(TM) i7-11370H @ 3.30GHz)
Tags: acl, AppLocker, ConstrainedLanguage, Enterprise, powershell, startup, windows

[3 Dec 10:47] Romo Ltd
Description:
MySQL Workbench 26.10.1 fails to launch on Windows workstations where PowerShell Constrained Language Mode is enforced through Microsoft AppLocker.

The application displays a JavaScript error in the main process during startup. The following PowerShell errors are reported:

- MethodInvocationNotSupportedInConstrainedLanguage
- CannotCreateTypeConstrainedLanguage
- Cannot invoke method. Method invocation is supported only on core types in this language mode.

Investigation identified the restrictWindowsAccess function within resources/app/src/private-files.cjs as the cause.

This function dynamically generates a PowerShell script, encodes it in Base64 and invokes powershell.exe using the -EncodedCommand parameter to configure NTFS discretionary access control lists (DACLs).

The generated script uses .NET methods and security object types that are not permitted under PowerShell Constrained Language Mode.

The application is already permitted by AppLocker, and running the application with elevated privileges does not resolve the issue.

This prevents MySQL Workbench from operating in enterprise environments where these security controls are enforced. Disabling or weakening application control policies is not an acceptable resolution.

How to repeat:
1. Configure a Windows workstation with AppLocker executable and script rule enforcement enabled.
2. Ensure MySQL Workbench is permitted to execute under the AppLocker policy.
3. Open Windows PowerShell as a standard user.
4. Execute $ExecutionContext.SessionState.LanguageMode and confirm that it returns ConstrainedLanguage.
5. Install MySQL Workbench 26.10.1.
6. Launch MySQL Workbench as a standard user.

Actual result:

The application fails to launch and displays a JavaScript error caused by restricted PowerShell method invocations within the restrictWindowsAccess function.

Expected result:

MySQL Workbench launches successfully and applies the required NTFS permissions without requiring changes to AppLocker or PowerShell security policies.

The affected environment also has the PowerShell execution policy configured as AllSigned.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.062 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.