Catégories
CVE-2026-102941 high CVSS 7.5

Lecture hors limites dans github.com/gomarkdown/markdown (CVE-2026-102941)

Résumé

Vulnérabilité dans github.com/gomarkdown/markdown (CVE-2026-102941). Risque d'opérations non autorisées ou de divulgation. Atténuation : mise à jour vers 0.0.0-20260724235538-61af6e1e6971 ou plus.

Description d'origine

La description telle que publiée par la source (souvent en anglais).

Summary

IsSafeURL slices url[:nPath] before checking that len(url) >= nPath, so a URL shorter than a path prefix (0, 1 or 2 bytes) triggers a slice-bounds panic, and this is reached end to end when the html.Safelink hardening flag is enabled and the input contains an empty or very short link destination, giving an unrecoverable crash DoS. Confirmed at HEAD (e08cff8; present since 2022).

The defect

parser/parser.go, IsSafeURL:

func IsSafeURL(url []byte) bool {
    nLink := len(url)
    for _, path := range validPaths {          // "/", "./", "../"
        nPath := len(path)
        linkPrefix := url[:nPath]               // line 789: sliced BEFORE the length guard
        if nLink >= nPath && bytes.Equal(linkPrefix, path) {   // line 790: guard is too late
            ...

url[:nPath] is evaluated before the nLink >= nPath check. When len(url) < nPath and cap(url) < nPath, the slice expression panics. Only the relative-path loop is affected; the adjacent URIs loop is already correctly guarded (the signal that this one deviates, the same signal as the anchor). Input: IsSafeURL("") panics ([:1] cap 0), IsSafeURL(".") panics ([:2] cap 1), IsSafeURL("..") panics ([:3] cap 2), while IsSafeURL("/") returns true. End to end: markdown.ToHTML(input, html.CommonFlags|html.Safelink) with input [x]() panics. Attacker model: (1) any service rendering untrusted Markdown with the html.Safelink flag (the URL-sanitizing hardening flag itself introduces the crash); or…

Source: GitHub Security Advisories (Global) NVD GitHub Advisory

Résumé généré automatiquement

Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.

Une vulnérabilité référencée CVE-2026-102941 a été découverte dans github.com/gomarkdown/markdown.
Risque d'opérations non autorisées ou de divulgation. Score CVSS : 7.5/10.
Action : mettez à jour github.com/gomarkdown/markdown vers 0.0.0-20260724235538-61af6e1e6971 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « github.com/gomarkdown/markdown CVE-2026-102941 » sur le site de l'éditeur.

CVE-2026-102941 (github.com/gomarkdown/markdown) — CWE-125 / CVSS v3 7.5
Vecteur d'attaque : distant (réseau) / non authentifié / sans interaction utilisateur
Correctif : 0.0.0-20260724235538-61af6e1e6971 — appliquer immédiatement
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.

❓ Quel est le problème

Une lecture hors limites (CWE-125) affecte github.com/gomarkdown/markdown.

📍 Périmètre concerné

Consultez l'avis de l'éditeur pour les versions affectées de github.com/gomarkdown/markdown.

🔥 Gravité

Gravité : Élevée (CVSS 7.5/10). Risque d'opérations non autorisées ou de divulgation.

🔧 Comment corriger

Mettre à jour vers 0.0.0-20260724235538-61af6e1e6971.

🛡️ Contournement

En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.

🔍 Détection

Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.

Actions de réponse

Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre

  1. 1
    Identify exposure identify
    grep -r 'github.com/gomarkdown/markdown' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で github.com/gomarkdown/markdown を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade github.com/gomarkdown/markdown to 0.0.0-20260724235538-61af6e1e6971

    ステージング環境で 0.0.0-20260724235538-61af6e1e6971 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Paquets affectés

go github.com/gomarkdown/markdown
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.0-20260724235538-61af6e1e6971"}]}]

Références

Nous utilisons des cookies pour l'analyse d'audience et la mesure publicitaire. Ce réglage s'applique à tous les sites de Game co., Ltd. En savoir plus