Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2023-39522: security: fix CVE-2023-39522 (#6665) · goauthentik/authentik@aa874dd

goauthentik is an open-source Identity Provider. In affected versions using a recovery flow with an identification stage an attacker is able to determine if a username exists. Only setups configured with a recovery flow are impacted by this. Anyone with a user account on a system with the recovery flow described above is susceptible to having their username/email revealed as existing. An attacker can easily enumerate and check users’ existence using the recovery flow, as a clear message is shown when a user doesn’t exist. Depending on configuration this can either be done by username, email, or both. This issue has been addressed in versions 2023.5.6 and 2023.6.2. Users are advised to upgrade. There are no known workarounds for this issue.

CVE
#oauth#auth

Expand Up @@ -5,18 +5,20 @@ from django.core import mail from django.core.mail.backends.locmem import EmailBackend from django.urls import reverse from rest_framework.test import APITestCase
from authentik.core.models import User from authentik.core.tests.utils import create_test_admin_user, create_test_flow from authentik.events.models import Event, EventAction from authentik.flows.markers import StageMarker from authentik.flows.models import FlowDesignation, FlowStageBinding from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER, FlowPlan from authentik.flows.tests import FlowTestCase from authentik.flows.views.executor import SESSION_KEY_PLAN from authentik.lib.generators import generate_id from authentik.stages.email.models import EmailStage

class TestEmailStageSending(APITestCase): class TestEmailStageSending(FlowTestCase): “""Email tests""”
def setUp(self): Expand Down Expand Up @@ -44,6 +46,13 @@ def test_pending_user(self): ): response = self.client.post(url) self.assertEqual(response.status_code, 200) self.assertStageResponse( response, self.flow, response_errors={ "non_field_errors": [{"string": "email-sent", "code": "email-sent"}] }, ) self.assertEqual(len(mail.outbox), 1) self.assertEqual(mail.outbox[0].subject, “authentik”) events = Event.objects.filter(action=EventAction.EMAIL_SENT) Expand All @@ -54,6 +63,32 @@ def test_pending_user(self): self.assertEqual(event.context[“to_email”], [self.user.email]) self.assertEqual(event.context[“from_email”], “[email protected]”)
def test_pending_fake_user(self): “""Test with pending (fake) user""” self.flow.designation = FlowDesignation.RECOVERY self.flow.save() plan = FlowPlan(flow_pk=self.flow.pk.hex, bindings=[self.binding], markers=[StageMarker()]) plan.context[PLAN_CONTEXT_PENDING_USER] = User(username=generate_id()) session = self.client.session session[SESSION_KEY_PLAN] = plan session.save()
url = reverse("authentik_api:flow-executor", kwargs={"flow_slug": self.flow.slug}) with patch( "authentik.stages.email.models.EmailStage.backend_class", PropertyMock(return_value=EmailBackend), ): response = self.client.post(url) self.assertEqual(response.status_code, 200) self.assertStageResponse( response, self.flow, response_errors={ "non_field_errors": [{"string": "email-sent", "code": "email-sent"}] }, ) self.assertEqual(len(mail.outbox), 0)
def test_send_error(self): """Test error during sending (sending will be retried)“"” plan = FlowPlan(flow_pk=self.flow.pk.hex, bindings=[self.binding], markers=[StageMarker()]) Expand Down

Related news

GHSA-vmf9-6pcv-xr87: Username enumeration attack in goauthentik

## Summary Using a recovery flow with an identification stage an attacker is able to determine if a username exists. ## Impact Only setups configured with a recovery flow are impacted by this. Anyone with a user account on a system with the recovery flow described above is susceptible to having their username/email revealed as existing. ## Details An attacker can easily enumerate and check users' existence using the recovery flow, as a clear message is shown when a user doesn't exist. Depending on configuration this can either be done by username, email, or both. The invalid and valid usernames should both show the same message and always send an email. Article for reference here: https://postmarkapp.com/guides/password-reset-email-best-practices#how-to-make-sure-your-password-reset-emails-are-secure ### For more information If you have any questions or comments about this advisory: - Email us at [[email protected]](mailto:[email protected])

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda
CVE-2023-6905
CVE-2023-6903
CVE-2023-6904
CVE-2023-3907