GHSA-x883-2vmg-xwf7: Github.com/authelia/authelia/v4 Authelia's Group Changes May Not Vulnerability

LOW
CVSS 1.6
CWE-281
Published
Advisory Summary

GHSA-x883-2vmg-xwf7 is a LOW (CVSS 1.6) authelia's group changes may not vulnerability (CWE-281: Improper Preservation of Permissions) affecting Github.com/authelia/authelia/v4 libraries in the Go ecosystem. The issue involves authelia's group changes may not have the expected results (yaml file backend). Remediation is available by upgrading affected packages to version 4.38.0.

GHSA-x883-2vmg-xwf7 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-x883-2vmg-xwf7
Severity LOW
CVSS v3.1 Base Score 1.6
CWE Classification CWE-281: Improper Preservation of Permissions
Affected Product Github.com/authelia/authelia/v4
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 1.6

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

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

How to Fix GHSA-x883-2vmg-xwf7

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

github.com/authelia/authelia/v4 fixed: 4.38.0
Upgrade github.com/authelia/authelia/v4 to 4.38.0
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 github.com/authelia/authelia/v4

How to Check if You Are Affected

To determine whether your application is affected by GHSA-x883-2vmg-xwf7, inspect your project dependencies for Github.com/authelia/authelia/v4:

inspect dependencies for github.com/authelia/authelia/v4

Analyze the terminal output to locate any version of Github.com/authelia/authelia/v4 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.38.0), 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-281: Improper Preservation of Permissions, where the product does not preserve permissions or incorrectly preserves permissions when copying, restoring, or sharing objects, which can cause them to have less restrictive permissions than intended. In Github.com/authelia/authelia/v4, 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 Under very specific conditions changes to a users groups may not have the expected results. The specific conditions are: * The file authentication backend is being used. * The [watch](https://www.authelia.com/configuration/first-factor/file/#watch) option is set to true. * The [refresh_interval](https://www.authelia.com/configuration/first-factor/introduction/#refresh_interval) is configured to a non-disabled value. * The users groups are adjusted by an administrator. * The user attempts to access a resource that their groups previously had access to but their new groups do not have access to. When these conditions are met administrators may find the changes are not taken into account by access control for longer than expected periods. While this may not necessarily be a security vulnerability it's security-adjacent and because of the unexpected nature of it and our dedication to a security-first culture we feel it's important to make users aware of this behaviour utilizing a security advisory and the existence of a fix. This: * Can not have an Impact for Unauthenticated Users. * Can not have an Impact for Configurations utilizing the LDAP Backend. * Can not be directly or indirectly caused by a users or third parties actions. ### Patches This behaviour was identified **_after_** it was inadvertently fixed in the `master` branch during the multi-cookie domain rework (i.e. between feature releases). A patch for prior versions can be provided upon request. The fix was to ensure the details are updated regardless of backend, it was a small oversight in previous functionality which made refreshing ineffectual prior to v4.37.0. ### Workarounds Ensure you restart between user database changes. ### References * https://github.com/authelia/authelia/blob/v4.37.5/internal/handlers/handler_verify.go#L376-L394

GHSA-x883-2vmg-xwf7 Affected Github.com/authelia/authelia/v4 Versions

1 component(s)
Fixed Versions:
4.38.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/authelia/authelia/v4
Go
≥ 4.37.0
< 4.38.0
4.38.0

References

Frequently Asked Questions

What is GHSA-x883-2vmg-xwf7?
GHSA-x883-2vmg-xwf7 is a security vulnerability in Github.com/authelia/authelia/v4 involving Authelia's Group Changes may not have the expected results (YAML file backend) under CWE-281: Improper Preservation of Permissions.
Which Github.com/authelia/authelia/v4 versions are affected?
Affected versions include releases prior to 4.38.0 across affected packages: github.com/authelia/authelia/v4.
What version fixes GHSA-x883-2vmg-xwf7?
Upgrading to 4.38.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/authelia/authelia/v4 affected?
Yes, github.com/authelia/authelia/v4 is affected in releases prior to 4.38.0. Upgrade your dependency to 4.38.0 or later.
What is the CVSS score of GHSA-x883-2vmg-xwf7?
GHSA-x883-2vmg-xwf7 has a CVSS v3.1 base score of 1.6 (LOW) with vector string CVSS:3.1/AV:P/AC:H/PR:H/UI:R/S:U/C:L/I:N/A:N.
What CWE is associated with GHSA-x883-2vmg-xwf7?
GHSA-x883-2vmg-xwf7 is classified under CWE-281: Improper Preservation of Permissions (The product does not preserve permissions or incorrectly preserves permissions when copying, restoring, or sharing objects, which can cause them to have less restrictive permissions than intended.).
How can I check Go dependencies for GHSA-x883-2vmg-xwf7?
Run the dependency tree command: 'inspect dependencies for github.com/authelia/authelia/v4'. 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-x883-2vmg-xwf7",
  "modified" : "2024-04-22T15:52:39Z",
  "published" : "2024-04-22T15:52:39Z",
  "aliases" : [ ],
  "summary" : "Authelia's Group Changes may not have the expected results (YAML file backend)",
  "details" : "### Impact\n\nUnder very specific conditions changes to a users groups may not have the expected results.\n\nThe specific conditions are:\n\n* The file authentication backend is being used.\n* The [watch](https://www.authelia.com/configuration/first-factor/file/#watch) option is set to true.\n* The [refresh_interval](https://www.authelia.com/configuration/first-factor/introduction/#refresh_interval) is configured to a non-disabled value.\n* The users groups are adjusted by an administrator.\n* The user attempts to access a resource that their groups previously had access to but their new groups do not have access to.\n\nWhen these conditions are met administrators may find the changes are not taken into account by access control for longer than expected periods. While this may not necessarily be a security vulnerability it's security-adjacent and because of the unexpected nature of it and our dedication to a security-first culture we feel it's important to make users aware of this behaviour utilizing a security advisory and the existence of a fix.\n\nThis:\n\n* Can not have an Impact for Unauthenticated Users.\n* Can not have an Impact for Configurations utilizing the LDAP Backend.\n* Can not be directly or indirectly caused by a users or third parties actions.\n\n### Patches\n\nThis behaviour was identified **_after_** it was inadvertently fixed in the `master` branch during the multi-cookie domain rework (i.e. between feature releases). A patch for prior versions can be provided upon request. The fix was to ensure the details are updated regardless of backend, it was a small oversight in previous functionality which made refreshing ineffectual prior to v4.37.0.\n\n### Workarounds\n\nEnsure you restart between user database changes.\n\n### References\n\n* https://github.com/authelia/authelia/blob/v4.37.5/internal/handlers/handler_verify.go#L376-L394\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:P/AC:H/PR:H/UI:R/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/authelia/authelia/v4"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.37.0"
      }, {
        "fixed" : "4.38.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/authelia/authelia/security/advisories/GHSA-x883-2vmg-xwf7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/authelia/authelia"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/authelia/authelia/blob/v4.37.5/internal/handlers/handler_verify.go#L376-L394"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-281" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-22T15:52:39Z",
    "nvd_published_at" : null
  }
}