CVE-2022-41874: Tauri Tauri Filesystem Scope Can Be Vulnerability

LOW
Advisory Identifier: GHSA-q9wv-22m9-vhqh
CVSS 2.3
CWE-284
Published
Advisory Summary

CVE-2022-41874 is a LOW (CVSS 2.3) tauri filesystem scope can be vulnerability (CWE-284: Improper Access Control) affecting Tauri libraries in the crates.io ecosystem. The issue involves tauri filesystem scope can be partially bypassed. Remediation is available by upgrading affected packages to version 1.0.7, 1.1.2.

CVE-2022-41874 at a Glance

CVE Identifier CVE-2022-41874
GHSA Identifier GHSA-q9wv-22m9-vhqh
Severity LOW
CVSS v3.1 Base Score 2.3
CWE Classification CWE-284: Improper Access Control
Affected Product Tauri
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 2.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:L/I:N/A:N).

Attack Vector Local (AV:L)
Attack Complexity High (AC:H)
Privileges Required High (PR:H)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2022-41874

To remediate this vulnerability, upgrade all affected Tauri dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Tauri fixed: 1.0.7
Upgrade Tauri to 1.0.7
Tauri fixed: 1.1.2
Upgrade Tauri to 1.1.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for Tauri

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-41874, inspect your project dependencies for Tauri:

inspect dependencies for Tauri

Analyze the terminal output to locate any version of Tauri in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.7), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Tauri, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Due to incorrect escaping of special characters in paths selected via the file dialog and drag and drop functionality, it was possible to partially bypass the `fs` scope definition. It was not possible to traverse into arbitrary paths, as the issue was limited to neighboring files and sub folders of already allowed paths. The impact differs on Windows, MacOS and Linux due to different specifications of valid path characters. On Linux or MacOS based systems it was possible to use the `*`, `**` and `[a-Z]` patterns inside a path, which allowed to read the content of sub directories and single character files in a folder, where only specific files or the directory itself were allowed. On Windows `[a-Z]` was the possible bypass pattern, as `*` is not treated as a valid path component. This implies that only single character files inside an already allowed directory were unintentionally accessible. This bypass depends on the file picker dialog or dragged files, as user selected paths are automatically added to the allow list at runtime. A successful bypass requires the user to select a pre-existing malicious file or directory during the file picker dialog and an adversary controlled logic to access these files. This means the issue by itself can not be abused and requires further intentional or unintentional privileges. ### Workaround Disable the `dialog` and `fileDropEnabled` component inside the `tauri.conf.json`. ### Patches The issue has been resolved in #5237 and the implementation now properly escapes the special characters. The patch has been included in releases: `1.0.7`, `1.1.2` and `1.2.0` ### For more information This issue was initially reported by MessyComposer in #5234. If you have any questions or comments about this advisory: Open an issue in tauri Email us at security@tauri.app

CVE-2022-41874 Affected Tauri Versions

2 component(s)
Fixed Versions:
1.0.71.1.2
Product / Package Ecosystem Affected Versions Fixed Version
Tauri
crates.io
≥ 1.0.0
< 1.0.7
1.0.7
Tauri
crates.io
≥ 1.1.0
< 1.1.2
1.1.2

References

Frequently Asked Questions

What is CVE-2022-41874?
CVE-2022-41874 is a security vulnerability in Tauri involving Tauri Filesystem Scope can be Partially Bypassed under CWE-284: Improper Access Control.
Which Tauri versions are affected?
Affected versions include releases prior to 1.0.7, 1.1.2 across affected packages: Tauri.
What version fixes CVE-2022-41874?
Upgrading to 1.0.7, 1.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Tauri affected?
Yes, Tauri is affected in releases prior to 1.0.7, 1.1.2. Upgrade your dependency to 1.0.7, 1.1.2 or later.
What is the CVSS score of CVE-2022-41874?
CVE-2022-41874 has a CVSS v3.1 base score of 2.3 (LOW) with vector string CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:L/I:N/A:N.
What CWE is associated with CVE-2022-41874?
CVE-2022-41874 is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check crates.io dependencies for CVE-2022-41874?
Run the dependency tree command: 'inspect dependencies for Tauri'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q9wv-22m9-vhqh",
  "modified" : "2023-02-28T16:52:02Z",
  "published" : "2022-11-08T17:33:26Z",
  "aliases" : [ "CVE-2022-41874" ],
  "summary" : "Tauri Filesystem Scope can be Partially Bypassed",
  "details" : "### Impact\n\nDue to incorrect escaping of special characters in paths selected via the file dialog and drag and drop functionality, it was possible to partially bypass the `fs` scope definition. It was not possible to traverse into arbitrary paths, as the issue was limited to neighboring files and sub folders of already allowed paths.\n\nThe impact differs on Windows, MacOS and Linux due to different specifications of valid path characters.\n\nOn Linux or MacOS based systems it was possible to use the `*`, `**` and `[a-Z]` patterns inside a path, which allowed to read the content of sub directories and single character files in a folder, where only specific files or the directory itself were allowed.\n\nOn Windows `[a-Z]` was the possible bypass pattern, as `*` is not treated as a valid path component. This implies that only single character files inside an already allowed directory were unintentionally accessible.\n\nThis bypass depends on the file picker dialog or dragged files, as user selected paths are automatically added to the allow list at runtime.\n\nA successful bypass requires the user to select a pre-existing malicious file or directory during the file picker dialog and an adversary controlled logic to access these files. This means the issue by itself can not be abused and requires further intentional or unintentional privileges.\n\n### Workaround\n\nDisable the `dialog` and `fileDropEnabled` component inside the `tauri.conf.json`.\n\n### Patches\n\nThe issue has been resolved in #5237 and the implementation now properly escapes the special characters. The patch has been included in releases: `1.0.7`, `1.1.2` and `1.2.0`\n\n### For more information\n\nThis issue was initially reported by MessyComposer in #5234.\n\nIf you have any questions or comments about this advisory:\n\nOpen an issue in tauri\nEmail us at security@tauri.app",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "Tauri"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "1.0.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "Tauri"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.1.0"
      }, {
        "fixed" : "1.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/tauri-apps/tauri/security/advisories/GHSA-q9wv-22m9-vhqh"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-41874"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tauri-apps/tauri/issues/5234"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tauri-apps/tauri/pull/5237"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/tauri-apps/tauri"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2022-0091.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-284" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-11-08T17:33:26Z",
    "nvd_published_at" : "2022-11-10T21:15:00Z"
  }
}