System details / 系统信息
macOS 26, v0.5.3
What's wrong? / 出了什么问题?
Overview
DeepChat contains a dylib Injection due to the com.apple.security.cs.disable-library-validation and com.apple.security.cs.allow-dyld-environment-variables entitlements being enabled. This allows an attacker to inject arbitrary code into the application's process space by loading malicious dynamic libraries, leading to complete application compromise.
You can check the entitlements using codesign:
macOSResearch % codesign -dv --entitlements - /Applications/DeepChat.app/Contents/MacOS/DeepChat
Executable=/Applications/DeepChat.app/Contents/MacOS/DeepChat
Identifier=com.wefonk.deepchat
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20500 size=511 flags=0x10000(runtime) hashes=5+7 location=embedded
Signature size=8973
Timestamp=12 Dec 2025 at 11:15:14 PM
Info.plist entries=35
TeamIdentifier=Y7P5QLKLYG
Runtime Version=15.4.0
Sealed Resources version=2 rules=13 files=2309
Internal requirements count=1 size=180
[Dict]
[Key] com.apple.security.cs.allow-dyld-environment-variables
[Value]
[Bool] true
[Key] com.apple.security.cs.allow-jit
[Value]
[Bool] true
[Key] com.apple.security.cs.allow-unsigned-executable-memory
[Value]
[Bool] true
[Key] com.apple.security.cs.disable-library-validation
[Value]
[Bool] true
[Key] com.apple.security.files.user-selected.read-only
[Value]
[Bool] true
[Key] com.apple.security.files.user-selected.read-write
[Value]
[Bool] true
[Key] com.apple.security.network.client
[Value]
[Bool] true
The attacker can abuse it as the following:
-
- Create malicious dylib
-
- Launch application with injection
DYLD_INSERT_LIBRARIES=/tmp/malicious.dylib /Applications/DeepChat.app/Contents/MacOS/DeepChat
Mitigation
Set com.apple.security.cs.disable-library-validation and com.apple.security.cs.allow-dyld-environment-variables entitlements to false.
System details / 系统信息
macOS 26, v0.5.3
What's wrong? / 出了什么问题?
Overview
DeepChat contains a dylib Injection due to the
com.apple.security.cs.disable-library-validationandcom.apple.security.cs.allow-dyld-environment-variablesentitlements being enabled. This allows an attacker to inject arbitrary code into the application's process space by loading malicious dynamic libraries, leading to complete application compromise.You can check the entitlements using
codesign:macOSResearch % codesign -dv --entitlements - /Applications/DeepChat.app/Contents/MacOS/DeepChat Executable=/Applications/DeepChat.app/Contents/MacOS/DeepChat Identifier=com.wefonk.deepchat Format=app bundle with Mach-O thin (x86_64) CodeDirectory v=20500 size=511 flags=0x10000(runtime) hashes=5+7 location=embedded Signature size=8973 Timestamp=12 Dec 2025 at 11:15:14 PM Info.plist entries=35 TeamIdentifier=Y7P5QLKLYG Runtime Version=15.4.0 Sealed Resources version=2 rules=13 files=2309 Internal requirements count=1 size=180 [Dict] [Key] com.apple.security.cs.allow-dyld-environment-variables [Value] [Bool] true [Key] com.apple.security.cs.allow-jit [Value] [Bool] true [Key] com.apple.security.cs.allow-unsigned-executable-memory [Value] [Bool] true [Key] com.apple.security.cs.disable-library-validation [Value] [Bool] true [Key] com.apple.security.files.user-selected.read-only [Value] [Bool] true [Key] com.apple.security.files.user-selected.read-write [Value] [Bool] true [Key] com.apple.security.network.client [Value] [Bool] trueThe attacker can abuse it as the following:
Mitigation
Set
com.apple.security.cs.disable-library-validationandcom.apple.security.cs.allow-dyld-environment-variablesentitlements to false.