gsd-2022-31127
Vulnerability from gsd
Modified
2023-12-13 01:19
Details
NextAuth.js is a complete open source authentication solution for Next.js applications. An attacker can pass a compromised input to the e-mail [signin endpoint](https://next-auth.js.org/getting-started/rest-api#post-apiauthsigninprovider) that contains some malicious HTML, tricking the e-mail server to send it to the user, so they can perform a phishing attack. Eg.: `balazs@email.com, <a href="http://attacker.com">Before signing in, claim your money!</a>`. This was previously sent to `balazs@email.com`, and the content of the email containing a link to the attacker's site was rendered in the HTML. This has been remedied in the following releases, by simply not rendering that e-mail in the HTML, since it should be obvious to the receiver what e-mail they used: next-auth v3 users before version 3.29.8 are impacted. (We recommend upgrading to v4, as v3 is considered unmaintained. next-auth v4 users before version 4.9.0 are impacted. If for some reason you cannot upgrade, the workaround requires you to sanitize the `email` parameter that is passed to `sendVerificationRequest` and rendered in the HTML. If you haven't created a custom `sendVerificationRequest`, you only need to upgrade. Otherwise, make sure to either exclude `email` from the HTML body or efficiently sanitize it.
Aliases
Aliases
{ "GSD": { "alias": "CVE-2022-31127", "description": "NextAuth.js is a complete open source authentication solution for Next.js applications. An attacker can pass a compromised input to the e-mail [signin endpoint](https://next-auth.js.org/getting-started/rest-api#post-apiauthsigninprovider) that contains some malicious HTML, tricking the e-mail server to send it to the user, so they can perform a phishing attack. Eg.: `balazs@email.com, \u003ca href=\"http://attacker.com\"\u003eBefore signing in, claim your money!\u003c/a\u003e`. This was previously sent to `balazs@email.com`, and the content of the email containing a link to the attacker\u0027s site was rendered in the HTML. This has been remedied in the following releases, by simply not rendering that e-mail in the HTML, since it should be obvious to the receiver what e-mail they used: next-auth v3 users before version 3.29.8 are impacted. (We recommend upgrading to v4, as v3 is considered unmaintained. next-auth v4 users before version 4.9.0 are impacted. If for some reason you cannot upgrade, the workaround requires you to sanitize the `email` parameter that is passed to `sendVerificationRequest` and rendered in the HTML. If you haven\u0027t created a custom `sendVerificationRequest`, you only need to upgrade. Otherwise, make sure to either exclude `email` from the HTML body or efficiently sanitize it.", "id": "GSD-2022-31127" }, "gsd": { "metadata": { "exploitCode": "unknown", "remediation": "unknown", "reportConfidence": "confirmed", "type": "vulnerability" }, "osvSchema": { "aliases": [ "CVE-2022-31127" ], "details": "NextAuth.js is a complete open source authentication solution for Next.js applications. An attacker can pass a compromised input to the e-mail [signin endpoint](https://next-auth.js.org/getting-started/rest-api#post-apiauthsigninprovider) that contains some malicious HTML, tricking the e-mail server to send it to the user, so they can perform a phishing attack. Eg.: `balazs@email.com, \u003ca href=\"http://attacker.com\"\u003eBefore signing in, claim your money!\u003c/a\u003e`. This was previously sent to `balazs@email.com`, and the content of the email containing a link to the attacker\u0027s site was rendered in the HTML. This has been remedied in the following releases, by simply not rendering that e-mail in the HTML, since it should be obvious to the receiver what e-mail they used: next-auth v3 users before version 3.29.8 are impacted. (We recommend upgrading to v4, as v3 is considered unmaintained. next-auth v4 users before version 4.9.0 are impacted. If for some reason you cannot upgrade, the workaround requires you to sanitize the `email` parameter that is passed to `sendVerificationRequest` and rendered in the HTML. If you haven\u0027t created a custom `sendVerificationRequest`, you only need to upgrade. Otherwise, make sure to either exclude `email` from the HTML body or efficiently sanitize it.", "id": "GSD-2022-31127", "modified": "2023-12-13T01:19:17.909090Z", "schema_version": "1.4.0" } }, "namespaces": { "cve.org": { "CVE_data_meta": { "ASSIGNER": "security-advisories@github.com", "ID": "CVE-2022-31127", "STATE": "PUBLIC", "TITLE": "Improper handling of email input in next-auth" }, "affects": { "vendor": { "vendor_data": [ { "product": { "product_data": [ { "product_name": "next-auth", "version": { "version_data": [ { "version_value": "\u003c 3.29.8" }, { "version_value": "\u003e= 4.0.0, \u003c 4.9.0" } ] } } ] }, "vendor_name": "nextauthjs" } ] } }, "data_format": "MITRE", "data_type": "CVE", "data_version": "4.0", "description": { "description_data": [ { "lang": "eng", "value": "NextAuth.js is a complete open source authentication solution for Next.js applications. An attacker can pass a compromised input to the e-mail [signin endpoint](https://next-auth.js.org/getting-started/rest-api#post-apiauthsigninprovider) that contains some malicious HTML, tricking the e-mail server to send it to the user, so they can perform a phishing attack. Eg.: `balazs@email.com, \u003ca href=\"http://attacker.com\"\u003eBefore signing in, claim your money!\u003c/a\u003e`. This was previously sent to `balazs@email.com`, and the content of the email containing a link to the attacker\u0027s site was rendered in the HTML. This has been remedied in the following releases, by simply not rendering that e-mail in the HTML, since it should be obvious to the receiver what e-mail they used: next-auth v3 users before version 3.29.8 are impacted. (We recommend upgrading to v4, as v3 is considered unmaintained. next-auth v4 users before version 4.9.0 are impacted. If for some reason you cannot upgrade, the workaround requires you to sanitize the `email` parameter that is passed to `sendVerificationRequest` and rendered in the HTML. If you haven\u0027t created a custom `sendVerificationRequest`, you only need to upgrade. Otherwise, make sure to either exclude `email` from the HTML body or efficiently sanitize it." } ] }, "impact": { "cvss": { "attackComplexity": "LOW", "attackVector": "NETWORK", "availabilityImpact": "LOW", "baseScore": 7.1, "baseSeverity": "HIGH", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "privilegesRequired": "NONE", "scope": "CHANGED", "userInteraction": "REQUIRED", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L", "version": "3.1" } }, "problemtype": { "problemtype_data": [ { "description": [ { "lang": "eng", "value": "CWE-79: Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)" } ] } ] }, "references": { "reference_data": [ { "name": "https://next-auth.js.org/getting-started/upgrade-v4", "refsource": "MISC", "url": "https://next-auth.js.org/getting-started/upgrade-v4" }, { "name": "https://github.com/nextauthjs/next-auth/security/advisories/GHSA-pgjx-7f9g-9463", "refsource": "CONFIRM", "url": "https://github.com/nextauthjs/next-auth/security/advisories/GHSA-pgjx-7f9g-9463" }, { "name": "https://github.com/nextauthjs/next-auth/commit/ae834f1e08a4a9915665eecb9479c74c6b039c9c", "refsource": "MISC", "url": "https://github.com/nextauthjs/next-auth/commit/ae834f1e08a4a9915665eecb9479c74c6b039c9c" }, { "name": "https://github.com/nextauthjs/next-auth/releases/tag/next-auth%40v4.9.0", "refsource": "MISC", "url": "https://github.com/nextauthjs/next-auth/releases/tag/next-auth%40v4.9.0" }, { "name": "https://next-auth.js.org/providers/email#customizing-emails", "refsource": "MISC", "url": "https://next-auth.js.org/providers/email#customizing-emails" } ] }, "source": { "advisory": "GHSA-pgjx-7f9g-9463", "discovery": "UNKNOWN" } }, "gitlab.com": { "advisories": [ { "affected_range": "\u003c3.29.8||\u003e=4.0.0 \u003c4.9.0", "affected_versions": "All versions before 3.29.8, all versions starting from 4.0.0 before 4.9.0", "cvss_v2": "AV:N/AC:M/Au:N/C:N/I:P/A:N", "cvss_v3": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "cwe_ids": [ "CWE-1035", "CWE-79", "CWE-937" ], "date": "2022-07-14", "description": "NextAuth.js is a complete open source authentication solution for Next.js applications. An attacker can pass a compromised input to the e-mail [signin endpoint](https://next-auth.js.org/getting-started/rest-api#post-apiauthsigninprovider) that contains some malicious HTML, tricking the e-mail server to send it to the user, so they can perform a phishing attack. Eg.: `balazs@email.com, \u003ca href=\"http://attacker.com\"\u003eBefore signing in, claim your money!\u003c/a\u003e`. This was previously sent to `balazs@email.com`, and the content of the email containing a link to the attacker\u0027s site was rendered in the HTML. This has been remedied in the following releases, by simply not rendering that e-mail in the HTML, since it should be obvious to the receiver what e-mail they used: next-auth v3 users before version 3.29.8 are impacted. (We recommend upgrading to v4, as v3 is considered unmaintained. next-auth v4 users before version 4.9.0 are impacted. If for some reason you cannot upgrade, the workaround requires you to sanitize the `email` parameter that is passed to `sendVerificationRequest` and rendered in the HTML. If you haven\u0027t created a custom `sendVerificationRequest`, you only need to upgrade. Otherwise, make sure to either exclude `email` from the HTML body or efficiently sanitize it.", "fixed_versions": [ "3.29.8", "4.9.0" ], "identifier": "CVE-2022-31127", "identifiers": [ "CVE-2022-31127", "GHSA-pgjx-7f9g-9463" ], "not_impacted": "All versions starting from 3.29.8 before 4.0.0, all versions starting from 4.9.0", "package_slug": "npm/next-auth", "pubdate": "2022-07-06", "solution": "Upgrade to versions 3.29.8, 4.9.0 or above.", "title": "Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)", "urls": [ "https://nvd.nist.gov/vuln/detail/CVE-2022-31127", "https://next-auth.js.org/getting-started/upgrade-v4", "https://github.com/nextauthjs/next-auth/security/advisories/GHSA-pgjx-7f9g-9463", "https://next-auth.js.org/providers/email#customizing-emails", "https://github.com/nextauthjs/next-auth/commit/ae834f1e08a4a9915665eecb9479c74c6b039c9c", "https://github.com/nextauthjs/next-auth/releases/tag/next-auth%40v4.9.0" ], "uuid": "5375a689-4d61-4af3-b76f-9cb0e8d305af" } ] }, "nvd.nist.gov": { "configurations": { "CVE_data_version": "4.0", "nodes": [ { "children": [], "cpe_match": [ { "cpe23Uri": "cpe:2.3:a:nextauth.js:next-auth:*:*:*:*:*:node.js:*:*", "cpe_name": [], "versionEndExcluding": "4.9.0", "versionStartIncluding": "4.0.0", "vulnerable": true }, { "cpe23Uri": "cpe:2.3:a:nextauth.js:next-auth:*:*:*:*:*:node.js:*:*", "cpe_name": [], "versionEndExcluding": "3.29.8", "vulnerable": true } ], "operator": "OR" } ] }, "cve": { "CVE_data_meta": { "ASSIGNER": "security-advisories@github.com", "ID": "CVE-2022-31127" }, "data_format": "MITRE", "data_type": "CVE", "data_version": "4.0", "description": { "description_data": [ { "lang": "en", "value": "NextAuth.js is a complete open source authentication solution for Next.js applications. An attacker can pass a compromised input to the e-mail [signin endpoint](https://next-auth.js.org/getting-started/rest-api#post-apiauthsigninprovider) that contains some malicious HTML, tricking the e-mail server to send it to the user, so they can perform a phishing attack. Eg.: `balazs@email.com, \u003ca href=\"http://attacker.com\"\u003eBefore signing in, claim your money!\u003c/a\u003e`. This was previously sent to `balazs@email.com`, and the content of the email containing a link to the attacker\u0027s site was rendered in the HTML. This has been remedied in the following releases, by simply not rendering that e-mail in the HTML, since it should be obvious to the receiver what e-mail they used: next-auth v3 users before version 3.29.8 are impacted. (We recommend upgrading to v4, as v3 is considered unmaintained. next-auth v4 users before version 4.9.0 are impacted. If for some reason you cannot upgrade, the workaround requires you to sanitize the `email` parameter that is passed to `sendVerificationRequest` and rendered in the HTML. If you haven\u0027t created a custom `sendVerificationRequest`, you only need to upgrade. Otherwise, make sure to either exclude `email` from the HTML body or efficiently sanitize it." } ] }, "problemtype": { "problemtype_data": [ { "description": [ { "lang": "en", "value": "CWE-79" } ] } ] }, "references": { "reference_data": [ { "name": "https://next-auth.js.org/getting-started/upgrade-v4", "refsource": "MISC", "tags": [ "Vendor Advisory" ], "url": "https://next-auth.js.org/getting-started/upgrade-v4" }, { "name": "https://github.com/nextauthjs/next-auth/security/advisories/GHSA-pgjx-7f9g-9463", "refsource": "CONFIRM", "tags": [ "Exploit", "Third Party Advisory" ], "url": "https://github.com/nextauthjs/next-auth/security/advisories/GHSA-pgjx-7f9g-9463" }, { "name": "https://next-auth.js.org/providers/email#customizing-emails", "refsource": "MISC", "tags": [ "Vendor Advisory" ], "url": "https://next-auth.js.org/providers/email#customizing-emails" }, { "name": "https://github.com/nextauthjs/next-auth/commit/ae834f1e08a4a9915665eecb9479c74c6b039c9c", "refsource": "MISC", "tags": [ "Patch", "Third Party Advisory" ], "url": "https://github.com/nextauthjs/next-auth/commit/ae834f1e08a4a9915665eecb9479c74c6b039c9c" }, { "name": "https://github.com/nextauthjs/next-auth/releases/tag/next-auth%40v4.9.0", "refsource": "MISC", "tags": [ "Release Notes", "Third Party Advisory" ], "url": "https://github.com/nextauthjs/next-auth/releases/tag/next-auth%40v4.9.0" } ] } }, "impact": { "baseMetricV2": { "acInsufInfo": false, "cvssV2": { "accessComplexity": "MEDIUM", "accessVector": "NETWORK", "authentication": "NONE", "availabilityImpact": "NONE", "baseScore": 4.3, "confidentialityImpact": "NONE", "integrityImpact": "PARTIAL", "vectorString": "AV:N/AC:M/Au:N/C:N/I:P/A:N", "version": "2.0" }, "exploitabilityScore": 8.6, "impactScore": 2.9, "obtainAllPrivilege": false, "obtainOtherPrivilege": false, "obtainUserPrivilege": false, "severity": "MEDIUM", "userInteractionRequired": true }, "baseMetricV3": { "cvssV3": { "attackComplexity": "LOW", "attackVector": "NETWORK", "availabilityImpact": "NONE", "baseScore": 6.1, "baseSeverity": "MEDIUM", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "privilegesRequired": "NONE", "scope": "CHANGED", "userInteraction": "REQUIRED", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "version": "3.1" }, "exploitabilityScore": 2.8, "impactScore": 2.7 } }, "lastModifiedDate": "2022-07-14T14:31Z", "publishedDate": "2022-07-06T18:15Z" } } }
Loading…
Loading…
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…