Skip to content

6.3.1

Choose a tag to compare

@DamienHarper DamienHarper released this 18 Nov 23:02
dba141b

auditor-bundle 6.3.1

🔒 Security

Anonymous access to role-restricted entity audits

Advisory: GHSA-96g2-mf57-639h

The default role checker granted access as soon as no user was identified, before looking at the
roles configured for the entity. An unauthenticated visitor could therefore list and read the audit
history of entities restricted with #[Security(view: [...])] (or the roles option of the entity
configuration), as long as the viewer route was reachable without logging in.

Roles are now checked first: an entity without roles stays accessible as before, and access to an
entity with roles is denied when no user is identified.

All users exposing the audit viewer are encouraged to upgrade. Applications that protect the viewer
routes with a firewall or an access_control rule requiring authentication were not exposed.

Reported by @Scwaall in #621, fixed by @Gumbraise in #630.

Note: 6.x is the previous major version and only receives bug and security fixes. Consider
upgrading to 7.x.


⚠️ Upgrade notes

Reading role-restricted audits without a user is now denied

The role checker is also used by the audit Reader, not only by the viewer. Code that reads the
audits of a role-restricted entity without an authenticated user (a console command, a scheduled
export, a Messenger handler…) used to be granted access, and now gets an AccessDeniedException.
Entities without roles are not affected.

If such code must read restricted audits, configure your own role checker for that context:

dh_auditor:
    role_checker: 'App\Audit\CustomRoleChecker'

What's Changed

Security

CI

  • fix(ci): test the pull request code on the 6.x branch (part of #656)
  • fix: fix branch for CI

References

Full Changelog: 6.3.0...6.3.1