# GHSA-x883-2vmg-xwf7: Authelia's Group Changes may not have the expected results (YAML file backend)

> Delayed group updates in Authelia's file backend may allow users to retain unauthorized access to resources after group changes.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Apr 2024
- **Also known as:** GO-2024-2744

## What is GHSA-x883-2vmg-xwf7?

GHSA-x883-2vmg-xwf7 is a missing authorization vulnerability in github.com/authelia/authelia/v4, published on 22 Apr 2024. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

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

## Which versions are affected by GHSA-x883-2vmg-xwf7?

3 open source packages ship an affected version, including github.com/authelia/authelia/v4.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/authelia/authelia/v4` | Go | From 4.37.0 | 4.38.0 |
| `github.com/authelia/authelia/v4` | Go | From 4.37.0 | 4.38.0 |
| `github.com/authelia/authelia/v4` | Go | From 4.37.0 | 4.38.0 |

## How do I fix GHSA-x883-2vmg-xwf7?

Upgrade github.com/authelia/authelia/v4 to 4.38.0 or later.

## Is GHSA-x883-2vmg-xwf7 being exploited?

There is no known exploitation of GHSA-x883-2vmg-xwf7 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-x883-2vmg-xwf7 and fix it if it is affected.

What it is: GHSA-x883-2vmg-xwf7 is a missing authorization vulnerability in github.com/authelia/authelia/v4, published on 22 Apr 2024. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-x883-2vmg-xwf7 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/authelia/authelia/v4 (Go): affected from 4.37.0; fixed in 4.38.0
- github.com/authelia/authelia/v4 (Go): affected from 4.37.0; fixed in 4.38.0
- github.com/authelia/authelia/v4 (Go): affected from 4.37.0; fixed in 4.38.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-x883-2vmg-xwf7/ (Markdown: https://insights.sbomify.com/GHSA-x883-2vmg-xwf7/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-x883-2vmg-xwf7

---
From sbomify Insights: https://insights.sbomify.com/GHSA-x883-2vmg-xwf7/
Summaries are generated and may contain mistakes; the official description above is the record.
