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.
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.