CVE-2023-48309 (GCVE-0-2023-48309)

Vulnerability from cvelistv5 – Published: 2023-11-20 18:25 – Updated: 2024-08-29 13:41
VLAI
Title
next-auth vulnerable to possible user mocking that bypasses basic authentication
Summary
NextAuth.js provides authentication for Next.js. `next-auth` applications prior to version 4.24.5 that rely on the default Middleware authorization are affected by a vulnerability. A bad actor could create an empty/mock user, by getting hold of a NextAuth.js-issued JWT from an interrupted OAuth sign-in flow (state, PKCE or nonce). Manually overriding the `next-auth.session-token` cookie value with this non-related JWT would let the user simulate a logged in user, albeit having no user information associated with it. (The only property on this user is an opaque randomly generated string). This vulnerability does not give access to other users' data, neither to resources that require proper authorization via scopes or other means. The created mock user has no information associated with it (ie. no name, email, access_token, etc.) This vulnerability can be exploited by bad actors to peek at logged in user states (e.g. dashboard layout). `next-auth` `v4.24.5` contains a patch for the vulnerability. As a workaround, using a custom authorization callback for Middleware, developers can manually do a basic authentication.
SSVC
Exploitation: none Automatable: yes Technical Impact: partial
CISA Coordinator · CISA-ADP (v2.0.3)
Decision recorded 2024-08-29 13:40 UTC
CWE
Assigner
GitHub_M CNA
Impacted products
Vendor Product Version
nextauthjs next-auth Affected: < 4.24.5
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T21:23:39.608Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "name": "https://github.com/nextauthjs/next-auth/security/advisories/GHSA-v64w-49xw-qq89",
            "tags": [
              "x_refsource_CONFIRM",
              "x_transferred"
            ],
            "url": "https://github.com/nextauthjs/next-auth/security/advisories/GHSA-v64w-49xw-qq89"
          },
          {
            "name": "https://github.com/nextauthjs/next-auth/commit/d237059b6d0cb868c041ba18b698e0cee20a2f10",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/nextauthjs/next-auth/commit/d237059b6d0cb868c041ba18b698e0cee20a2f10"
          },
          {
            "name": "https://authjs.dev/guides/basics/role-based-access-control",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://authjs.dev/guides/basics/role-based-access-control"
          },
          {
            "name": "https://next-auth.js.org/configuration/nextjs#advanced-usage",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://next-auth.js.org/configuration/nextjs#advanced-usage"
          },
          {
            "name": "https://next-auth.js.org/configuration/nextjs#middlewar",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://next-auth.js.org/configuration/nextjs#middlewar"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2023-48309",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "yes"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-08-29T13:40:21.107207Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-08-29T13:41:03.796Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "product": "next-auth",
          "vendor": "nextauthjs",
          "versions": [
            {
              "status": "affected",
              "version": "\u003c 4.24.5"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "NextAuth.js provides authentication for Next.js. `next-auth` applications prior to version 4.24.5 that rely on the default Middleware authorization are affected by a vulnerability. A bad actor could create an empty/mock user, by getting hold of a NextAuth.js-issued JWT from an interrupted OAuth sign-in flow (state, PKCE or nonce). Manually overriding the `next-auth.session-token` cookie value with this non-related JWT would let the user simulate a logged in user, albeit having no user information associated with it. (The only property on this user is an opaque randomly generated string). This vulnerability does not give access to other users\u0027 data, neither to resources that require proper authorization via scopes or other means. The created mock user has no information associated with it (ie. no name, email, access_token, etc.) This vulnerability can be exploited by bad actors to peek at logged in user states (e.g. dashboard layout). `next-auth` `v4.24.5` contains a patch for the vulnerability. As a workaround, using a custom authorization callback for Middleware, developers can manually do a basic authentication."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "NONE",
            "baseScore": 5.3,
            "baseSeverity": "MEDIUM",
            "confidentialityImpact": "LOW",
            "integrityImpact": "NONE",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
            "version": "3.1"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-285",
              "description": "CWE-285: Improper Authorization",
              "lang": "en",
              "type": "CWE"
            }
          ]
        },
        {
          "descriptions": [
            {
              "cweId": "CWE-863",
              "description": "CWE-863: Incorrect Authorization",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2023-11-20T18:25:01.896Z",
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M"
      },
      "references": [
        {
          "name": "https://github.com/nextauthjs/next-auth/security/advisories/GHSA-v64w-49xw-qq89",
          "tags": [
            "x_refsource_CONFIRM"
          ],
          "url": "https://github.com/nextauthjs/next-auth/security/advisories/GHSA-v64w-49xw-qq89"
        },
        {
          "name": "https://github.com/nextauthjs/next-auth/commit/d237059b6d0cb868c041ba18b698e0cee20a2f10",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/nextauthjs/next-auth/commit/d237059b6d0cb868c041ba18b698e0cee20a2f10"
        },
        {
          "name": "https://authjs.dev/guides/basics/role-based-access-control",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://authjs.dev/guides/basics/role-based-access-control"
        },
        {
          "name": "https://next-auth.js.org/configuration/nextjs#advanced-usage",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://next-auth.js.org/configuration/nextjs#advanced-usage"
        },
        {
          "name": "https://next-auth.js.org/configuration/nextjs#middlewar",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://next-auth.js.org/configuration/nextjs#middlewar"
        }
      ],
      "source": {
        "advisory": "GHSA-v64w-49xw-qq89",
        "discovery": "UNKNOWN"
      },
      "title": "next-auth vulnerable to possible user mocking that bypasses basic authentication"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "cveId": "CVE-2023-48309",
    "datePublished": "2023-11-20T18:25:01.896Z",
    "dateReserved": "2023-11-14T17:41:15.572Z",
    "dateUpdated": "2024-08-29T13:41:03.796Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": {
        "adp": [
          {
            "providerMetadata": {
              "dateUpdated": "2024-08-02T21:23:39.608Z",
              "orgId": "af854a3a-2127-422b-91ae-364da2661108",
              "shortName": "CVE"
            },
            "references": [
              {
                "name": "https://github.com/nextauthjs/next-auth/security/advisories/GHSA-v64w-49xw-qq89",
                "tags": [
                  "x_refsource_CONFIRM",
                  "x_transferred"
                ],
                "url": "https://github.com/nextauthjs/next-auth/security/advisories/GHSA-v64w-49xw-qq89"
              },
              {
                "name": "https://github.com/nextauthjs/next-auth/commit/d237059b6d0cb868c041ba18b698e0cee20a2f10",
                "tags": [
                  "x_refsource_MISC",
                  "x_transferred"
                ],
                "url": "https://github.com/nextauthjs/next-auth/commit/d237059b6d0cb868c041ba18b698e0cee20a2f10"
              },
              {
                "name": "https://authjs.dev/guides/basics/role-based-access-control",
                "tags": [
                  "x_refsource_MISC",
                  "x_transferred"
                ],
                "url": "https://authjs.dev/guides/basics/role-based-access-control"
              },
              {
                "name": "https://next-auth.js.org/configuration/nextjs#advanced-usage",
                "tags": [
                  "x_refsource_MISC",
                  "x_transferred"
                ],
                "url": "https://next-auth.js.org/configuration/nextjs#advanced-usage"
              },
              {
                "name": "https://next-auth.js.org/configuration/nextjs#middlewar",
                "tags": [
                  "x_refsource_MISC",
                  "x_transferred"
                ],
                "url": "https://next-auth.js.org/configuration/nextjs#middlewar"
              }
            ],
            "title": "CVE Program Container"
          },
          {
            "metrics": [
              {
                "other": {
                  "content": {
                    "id": "CVE-2023-48309",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "yes"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2024-08-29T13:40:21.107207Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2024-08-29T13:40:58.039Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "product": "next-auth",
              "vendor": "nextauthjs",
              "versions": [
                {
                  "status": "affected",
                  "version": "\u003c 4.24.5"
                }
              ]
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "NextAuth.js provides authentication for Next.js. `next-auth` applications prior to version 4.24.5 that rely on the default Middleware authorization are affected by a vulnerability. A bad actor could create an empty/mock user, by getting hold of a NextAuth.js-issued JWT from an interrupted OAuth sign-in flow (state, PKCE or nonce). Manually overriding the `next-auth.session-token` cookie value with this non-related JWT would let the user simulate a logged in user, albeit having no user information associated with it. (The only property on this user is an opaque randomly generated string). This vulnerability does not give access to other users\u0027 data, neither to resources that require proper authorization via scopes or other means. The created mock user has no information associated with it (ie. no name, email, access_token, etc.) This vulnerability can be exploited by bad actors to peek at logged in user states (e.g. dashboard layout). `next-auth` `v4.24.5` contains a patch for the vulnerability. As a workaround, using a custom authorization callback for Middleware, developers can manually do a basic authentication."
            }
          ],
          "metrics": [
            {
              "cvssV3_1": {
                "attackComplexity": "LOW",
                "attackVector": "NETWORK",
                "availabilityImpact": "NONE",
                "baseScore": 5.3,
                "baseSeverity": "MEDIUM",
                "confidentialityImpact": "LOW",
                "integrityImpact": "NONE",
                "privilegesRequired": "NONE",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
                "version": "3.1"
              }
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "cweId": "CWE-285",
                  "description": "CWE-285: Improper Authorization",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            },
            {
              "descriptions": [
                {
                  "cweId": "CWE-863",
                  "description": "CWE-863: Incorrect Authorization",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2023-11-20T18:25:01.896Z",
            "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
            "shortName": "GitHub_M"
          },
          "references": [
            {
              "name": "https://github.com/nextauthjs/next-auth/security/advisories/GHSA-v64w-49xw-qq89",
              "tags": [
                "x_refsource_CONFIRM"
              ],
              "url": "https://github.com/nextauthjs/next-auth/security/advisories/GHSA-v64w-49xw-qq89"
            },
            {
              "name": "https://github.com/nextauthjs/next-auth/commit/d237059b6d0cb868c041ba18b698e0cee20a2f10",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/nextauthjs/next-auth/commit/d237059b6d0cb868c041ba18b698e0cee20a2f10"
            },
            {
              "name": "https://authjs.dev/guides/basics/role-based-access-control",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://authjs.dev/guides/basics/role-based-access-control"
            },
            {
              "name": "https://next-auth.js.org/configuration/nextjs#advanced-usage",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://next-auth.js.org/configuration/nextjs#advanced-usage"
            },
            {
              "name": "https://next-auth.js.org/configuration/nextjs#middlewar",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://next-auth.js.org/configuration/nextjs#middlewar"
            }
          ],
          "source": {
            "advisory": "GHSA-v64w-49xw-qq89",
            "discovery": "UNKNOWN"
          },
          "title": "next-auth vulnerable to possible user mocking that bypasses basic authentication"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "assignerShortName": "GitHub_M",
        "cveId": "CVE-2023-48309",
        "datePublished": "2023-11-20T18:25:01.896Z",
        "dateReserved": "2023-11-14T17:41:15.572Z",
        "dateUpdated": "2024-08-29T13:41:03.796Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.