Skip to content

[bug] Tauri 2.1.1 & 1.8.1 is affected by glib-rs 0.15 security vulnerability #12048

Closed as not planned

Description

@ilyagr

Describe the bug

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.

GitHub informed me about this in https://github.com/ilyagr/diffedit3/security/dependabot/10.

Reproduction

No response

Expected behavior

It'd be great if there was a tauri 1.18.2 that could work with glib 0.20 :)

Full tauri info output

N/A

Stack trace

No response

Additional context

No response

Activity

  1. 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
  2. FabianLars commented on Dec 25, 2024

    @FabianLars
    Member

    Since the gtk3 bindings are unmaintained I think this is a wontfix sadly. (We don't use glib directly ourselves)

  3. added
    status: upstreamThis issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes
    dependenciesPull requests that update a dependency file
    and removed
    status: needs triageThis issue needs to triage, applied to new issues
    on Dec 25, 2024
  4. ilyagr commented on Dec 25, 2024

    @ilyagr
    Author

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

  5. ilyagr commented on Dec 27, 2024

    @ilyagr
    Author

    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.

    Cc: #7335

  6. 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
  7. FabianLars commented on Dec 27, 2024

    @FabianLars
    Member

    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)

  8. ilyagr commented on Dec 28, 2024

    @ilyagr
    Author

    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!

  9. 1 remaining item

  10. added a commit that references this issue on Dec 20, 2025
  11. velocitysystems commented on Feb 1, 2026

    @velocitysystems
    Contributor

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

    Current State

    From Cargo.lock:

    • glib: 0.18.5 ❌ (vulnerable)
    • gtk: 0.18.2
    • webkit2gtk: 2.0.1

    Challenges

    The dependency chain is:

    tauri-runtime-wry → gtk 0.18 + webkit2gtk 2.0 → glib 0.18
    

    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:

    • gtk-rs to release gtk 0.19+ with glib 0.20 support — not happening (gtk3-rs is EOL)
    • webkit2gtk-rs (Tauri's fork) to update to glib 0.20 — requires gtk 0.19+

    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

    1. Short-term: Audit if VariantStrIter is actually used in Tauri's Linux code paths
    2. 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)
    3. Long-term: Plan migration path to GTK4 for Tauri v3

    References

  12. added a commit that references this issue on Feb 6, 2026
  13. nimdeveloper commented on Sep 29, 2026

    @nimdeveloper

    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

  14. FabianLars commented on Sep 29, 2026

    @FabianLars
    Member
  15. added a commit that references this issue on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency fileplatform: Linuxstatus: upstreamThis issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions