CyberRota Analysis
AI-GeneratedInfracost versions prior to 0.10.45 are vulnerable due to improper handling of symbolic links in the readFile, pathExists, isDir, and matchPaths functions, which may allow unauthorized access to sensitive files outside the repository. This could lead to the exposure of confidential information, including repository secrets, through generated configurations or comments in pull requests. Organizations using Infracost for cloud cost intelligence should prioritize updating to version 0.10.45 to mitigate this risk.
Public Exploit Signal
A public exploit, PoC, GitHub repository or Metasploit reference was detected for this CVE.
Note: these links are listed for security research and verification purposes only.
Original NVD Description
Infracost provides cloud cost intelligence for engineers, AI coding agents, and CI/CD. Prior to 0.10.45, the readFile, pathExists, isDir, and matchPaths template functions in internal/config/template/parser.go use a lexical filepath.Rel check and a leaf-only os.Lstat check that do not resolve an intermediate directory symlink. A repository can contain a path such as evil/file where evil points outside the checkout, causing os.ReadFile and related operations to follow the symlink and read runner-accessible files. The resulting content is rendered into generated configuration and can be surfaced through the Infracost dashboard or pull request comment, with greater impact in workflows that provide repository secrets. This issue is fixed in version 0.10.45.