CVE-2026-27612
JSON

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 packageVersionsReported by
denpiligrim repostat< 1.0.1, before 1.0.1CVE List, NVD
repostat (npm)before 1.0.1GitHub Advisory Database

All scores

GitHub_M6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHub6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-79

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

SourceRecordLicence
CVE ListCVE-2026-27612 changed 2026-11-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-fm8c-6m29-rp6j changed 2026-02-25CC-BY-4.0
NVDCVE-2026-27612 changed 2026-11-03Public domain