Traversée de chemin dans github.com/infracost/infracost (CVE-2026-71493)
Résumé
Traversée de chemin dans github.com/infracost/infracost (CVE-2026-71493). Risque d'opérations non autorisées ou de divulgation. Exploitable via readFile. Atténuation : mise à jour vers 0.10.45 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
Impact
Path traversal via link following in the Infracost config-template parser. The readFile, pathExists, isDir, and matchPaths template functions confined repo-supplied paths with a lexical filepath.Rel check plus a leaf-only os.Lstat:
{{ readFile "evil/file" }}
With an intermediate directory symlink committed in the repo (evil -> /), the path is lexically clean and the leaf is a regular file, so both checks pass, but os.ReadFile follows the symlink and reads outside the checkout. The contents are rendered into the generated config and surfaced via the Infracost dashboard and PR comment, so anyone who can open a pull request can read files off the runner.
Affects infracost up to and including v0.10.44. Successful exploitation reads any file the CLI process can reach on the runner. Impact depends on what the run exposes: under on: pull_request (the configuration in Infracost's documentation) fork pull requests run without secrets and with a read-only token, so exposure is limited. If Infracost runs under pull_request_target, or is triggered by a same-repository pull request, the read reaches the repository's secrets, enabling secret theft. The patch confines all four functions regardless of trigger.
Patches
Fixed in v0.10.45 (#3586) by routing all four functions through security.IsPathAllowed, which resolves symlinks anywhere in the path before a segment-aware containment c…
Source: NIST National Vulnerability Database 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-71493 a été découverte dans github.com/infracost/infracost.
Des attaquants peuvent cibler un point d'entrée spécifique comme readFile à distance pour détourner le produit.
Risque d'opérations non autorisées ou de divulgation.
Action : mettez à jour github.com/infracost/infracost vers 0.10.45 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « github.com/infracost/infracost CVE-2026-71493 » sur le site de l'éditeur.
CVE-2026-71493 (github.com/infracost/infracost) — CWE-22
Surface d'attaque : readFile / pathExists / isDir / matchPaths
Correctif : 0.10.45 — appliquer immédiatement
Contournement : No full fix without upgrading.
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.
Une traversée de chemin (CWE-22) affecte github.com/infracost/infracost. Les attaquants atteignent le code vulnérable via readFile.
Consultez l'avis de l'éditeur pour les versions affectées de github.com/infracost/infracost. Surface d'attaque : readFile / pathExists / isDir / matchPaths.
Gravité : ?. Risque d'opérations non autorisées ou de divulgation.
Mettre à jour vers 0.10.45.
Contournement : No full fix without upgrading.
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
-
1Identify exposure identify
grep -r 'github.com/infracost/infracost' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
github.com/infracost/infracostを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
No full fix without upgrading.パッチが適用されるまでの応急処置として、No full fix without upgrading. を実施。回避策の副作用 (機能低下) を確認した上で。
-
3Apply patch patch
Upgrade github.com/infracost/infracost to 0.10.45ステージング環境で 0.10.45 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。