You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] Tauri 2.1.1 & 1.8.1 is affected by glib-rs 0.15 security vulnerability #12048
The tauri 1.8.1 Rust package currently requires glib@0.15 on Linux, but versions of glib (the Rust bindings) >=0.15 and <0.20 are affected by GHSA-wrw7-89jp-8q8g . I believe (but am not sure) that the nightly version of Tauri 1 probably depends on glib@0.18, which is also bad.
changed the title [-][bug] Tauri 1.8.1 is affected by glib 0.15 security vulnerability[/-][+][bug] Tauri 1.8.1 is affected by glib-rs 0.15 security vulnerability[/+]on Dec 25, 2024
If the gtk3 bindings are never made compatible with glib 0.20, another option might be to downgrade to gtk 0.14.3. Unless, of course, another security bug appears that affects older versions of some gtk dependency...
Actually, Tauri 2.1.1 also seems affected. It seems to be using gtk v0.18.2 which seems to depend on glib v0.18. I'm surprised it's not showing up in the Security tab of this repo; I guess you didn't enable dependency-based security warning.
changed the title [-][bug] Tauri 1.8.1 is affected by glib-rs 0.15 security vulnerability[/-][+][bug] Tauri 2.1.1 & 1.8.1 is affected by glib-rs 0.15 security vulnerability[/+]on Dec 27, 2024
We do see them in the Security tab, but only those with repo access can see that (afaik github doesn't allow us to make this public?).
And I think there's no gh issue because this is still not resolved: rustsec/audit-check#8
I doubt anyone in the community would be interested in forking the gtk3 bindings so i'll close this in favor of #7335 (but only because this unsound issue doesn't seem to affect us)
I didn't understand what you said about rustsec/audit-check#8 and how the check should be behaving, nor why this "wouldn't affect us", so I'd appreciate more details if you are feeling like explaining it. But you are the expert here, so I trust your conclusion that Tauri for Linux not on fire. Glad to hear it!
The issue reports that Tauri depends on glib 0.18.5 (via gtk 0.18 and webkit2gtk 2.0.1), which is affected by GHSA-wrw7-89jp-8q8g - an unsoundness bug in VariantStrIter that can cause NULL pointer dereferences.
Affected versions: glib >= 0.15 and < 0.20
Vulnerability Details
The VariantStrIter::impl_get function was unsound - an immutable reference &p to a *mut libc::c_char pointer was passed to a C function that mutates the pointer in-place. After recent Rust compiler optimizations, these writes are disregarded, causing NULL pointer dereferences when std::ffi::CStr::from_ptr is called.
The vulnerability is in glib::VariantStrIter. If Tauri doesn't use this specific iterator, the practical risk may be low. Worth auditing whether Tauri's code paths actually trigger the vulnerable code.
Option 4: Workaround via Cargo Patch
Users could potentially patch glib in their own projects, but this is fragile and not a real fix.
Option 5: Fork and Backport Fix
Fork gtk-rs 0.18 and backport the glib fix from 0.20. This is maintenance-heavy but may be the only viable short-term solution.
Recommendation
Short-term: Audit if VariantStrIter is actually used in Tauri's Linux code paths
Medium-term: Consider if webkit2gtk-rs can be updated independently to use newer glib (may require forking gtk-rs 0.18 with the fix backported)
Long-term: Plan migration path to GTK4 for Tauri v3
Activity
[-][bug] Tauri 1.8.1 is affected by glib 0.15 security vulnerability[/-][+][bug] Tauri 1.8.1 is affected by glib-rs 0.15 security vulnerability[/+]FabianLars commentedon Dec 25, 2024
Since the gtk3 bindings are unmaintained I think this is a
wontfixsadly. (We don't use glib directly ourselves)ilyagr commentedon Dec 25, 2024
If the gtk3 bindings are never made compatible with glib 0.20, another option might be to downgrade to gtk 0.14.3. Unless, of course, another security bug appears that affects older versions of some gtk dependency...
ilyagr commentedon Dec 27, 2024
Actually, Tauri 2.1.1 also seems affected. It seems to be using
gtk v0.18.2which seems to depend onglib v0.18. I'm surprised it's not showing up in the Security tab of this repo; I guess you didn't enable dependency-based security warning.Cc: #7335
[-][bug] Tauri 1.8.1 is affected by glib-rs 0.15 security vulnerability[/-][+][bug] Tauri 2.1.1 & 1.8.1 is affected by glib-rs 0.15 security vulnerability[/+]FabianLars commentedon Dec 27, 2024
We do see them in the Security tab, but only those with repo access can see that (afaik github doesn't allow us to make this public?).
And I think there's no gh issue because this is still not resolved: rustsec/audit-check#8
I doubt anyone in the community would be interested in forking the gtk3 bindings so i'll close this in favor of #7335 (but only because this unsound issue doesn't seem to affect us)
ilyagr commentedon Dec 28, 2024
Thanks for looking into this!
I didn't understand what you said about rustsec/audit-check#8 and how the check should be behaving, nor why this "wouldn't affect us", so I'd appreciate more details if you are feeling like explaining it. But you are the expert here, so I trust your conclusion that Tauri for Linux not on fire. Glad to hear it!
1 remaining item
docs(security): add advisory for GHSA-wrw7-89jp-8q8g (glib vulnerabil…
deps: update dependencies and document glib vulnerability
deps: update dependencies and document glib vulnerability (#88)
velocitysystems commentedon Feb 1, 2026
Analysis: glib-rs Vulnerability
Problem
The issue reports that Tauri depends on glib 0.18.5 (via gtk 0.18 and webkit2gtk 2.0.1), which is affected by GHSA-wrw7-89jp-8q8g - an unsoundness bug in
VariantStrIterthat can cause NULL pointer dereferences.Affected versions: glib >= 0.15 and < 0.20
Vulnerability Details
The
VariantStrIter::impl_getfunction was unsound - an immutable reference&pto a*mut libc::c_charpointer was passed to a C function that mutates the pointer in-place. After recent Rust compiler optimizations, these writes are disregarded, causing NULL pointer dereferences whenstd::ffi::CStr::from_ptris called.Current State
From
Cargo.lock:Challenges
The dependency chain is:
gtk3-rs (gtk 0.18) is unmaintained upstream and will not receive updates to use glib 0.20. The gtk-rs project has moved to GTK4 bindings only.
What Can Be Done
Option 1: Upstream Fix (Ideal but Blocked)
Upgrade to glib 0.20+ requires:
Option 2: Migrate to GTK4 (Long-term)
This would be a major undertaking requiring:
Option 3: Assess Actual Risk (Pragmatic)
The vulnerability is in
glib::VariantStrIter. If Tauri doesn't use this specific iterator, the practical risk may be low. Worth auditing whether Tauri's code paths actually trigger the vulnerable code.Option 4: Workaround via Cargo Patch
Users could potentially patch glib in their own projects, but this is fragile and not a real fix.
Option 5: Fork and Backport Fix
Fork gtk-rs 0.18 and backport the glib fix from 0.20. This is maintenance-heavy but may be the only viable short-term solution.
Recommendation
VariantStrIteris actually used in Tauri's Linux code pathsReferences
docs(security): document GHSA-wrw7-89jp-8q8g known limitation in GUI
IteratorandDoubleEndedIteratorimpls forglib::VariantStrIter#15035 as a duplicate of this issueIteratorandDoubleEndedIteratorimpls forglib::VariantStrIterplugins-workspace#3330 as a duplicate of this issuechore: update Cargo.lock dependencies to latest compatible versions
chore(security): silence glib RUSTSEC-2024-0429 via dependabot.yml ig…
docs(security): document glib upstream issue + add dependabot config
chore(deps): bump transitive rust deps via cargo update
chore(desktop): record RUSTSEC-2024-0429 (glib) as accepted risk in a…
nimdeveloper commentedon Sep 29, 2026
gtk3 and glib got an update, now it's tauri's side to do an update, related issues:
tauri-apps/muda#219
tauri-apps/muda#379
#10910
@FabianLars
FabianLars commentedon Sep 29, 2026
tauri-apps/wry#1843
docs(security): record glib Dependabot alert #1 as blocked upstream (#62