6.1medium
Repostat Vulnerable to Reflected Cross-Site Scripting (XSS) via repo prop in RepoCard
- Severity
- 6.1medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.24% (higher than 16% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-fm8c-6m29-rp6j
Description
Repostat is a React component to fetch and display GitHub repository info. Prior to version 1.0.1, the `RepoCard` component is vulnerable to Reflected Cross-Site Scripting (XSS). The vulnerability occurs because the component uses React's `dangerouslySetInnerHTML` to render the repository name (`repo` prop) during the loading state without any sanitization. If a developer using this package passes unvalidated user input directly into the `repo` prop (for example, reading it from a URL query parameter), an attacker can execute arbitrary JavaScript in the context of the user's browser. In version 1.0.1, the use of dangerouslySetInnerHTML has been removed, and the repo prop is now safely rendered using standard React JSX data binding, which automatically escapes HTML entities.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| denpiligrim repostat | < 1.0.1, before 1.0.1 | CVE List, NVD |
| repostat (npm) | before 1.0.1 | GitHub Advisory Database |
All scores
| GitHub_M | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
Repostat is a React component to fetch and display GitHub repository info. Prior to version 1.0.1, the `RepoCard` component is vulnerable to Reflected Cross-Site Scripting (XSS). The vulnerability occurs because the component uses React's `dangerouslySetInnerHTML` to render the repository name (`repo` prop) during the loading state without any sanitization. If a developer using this package passes unvalidated user input directly into the `repo` prop (for example, reading it from a URL query parameter), an attacker can execute arbitrary JavaScript in the context of the user's browser. In version 1.0.1, the use of dangerouslySetInnerHTML has been removed, and the repo prop is now safely rendered using standard React JSX data binding, which automatically escapes HTML entities.
GitHub Advisory Database
Impact
The RepoCard component is vulnerable to Reflected Cross-Site Scripting (XSS). The vulnerability occurs because the component uses React's dangerouslySetInnerHTML to render the repository name (repo prop) during the loading state without any sanitization.
If a developer using this package passes unvalidated user input directly into the repo prop (for example, reading it from a URL query parameter), an attacker can execute arbitrary JavaScript in the context of the user's browser.
Proof of Concept
import { RepoCard } from 'repostat';
function App() {
const params = new URLSearchParams(window.location.search);
const maliciousRepo = params.get('repo') || 'facebook/react';
return <RepoCard repo={maliciousRepo} token="YOUR_TOKEN" />;
}
Remediation
Update to version 1.0.1. The use of dangerouslySetInnerHTML has been removed, and the repo prop is now safely rendered using standard React JSX data binding, which automatically escapes HTML entities.
NVD (es)
Repostat es un componente de React para obtener y mostrar información de repositorios de GitHub. Antes de la versión 1.0.1, el componente 'RepoCard' es vulnerable a cross-site scripting (XSS) reflejado. La vulnerabilidad ocurre porque el componente utiliza `dangerouslySetInnerHTML` de React para renderizar el nombre del repositorio (propiedad 'repo') durante el estado de carga sin ninguna sanitización. Si un desarrollador que utiliza este paquete pasa una entrada de usuario no validada directamente a la propiedad 'repo' (por ejemplo, leyéndola de un parámetro de consulta de URL), un atacante puede ejecutar JavaScript arbitrario en el contexto del navegador del usuario. En la versión 1.0.1, se ha eliminado el uso de `dangerouslySetInnerHTML`, y la propiedad 'repo' ahora se renderiza de forma segura utilizando el enlace de datos JSX estándar de React, que escapa automáticamente las entidades HTML.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-27612 changed 2026-11-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-fm8c-6m29-rp6j changed 2026-02-25 | CC-BY-4.0 |
| NVD | CVE-2026-27612 changed 2026-11-03 | Public domain |