---
title: "CVE-2025-61731"
canonical_url: "https://pkgseek.com/security/CVE-2025-61731"
locale: "zh-CN"
source: "pkgseek"
entity_type: "cve"
severity: "high"
---

# CVE-2025-61731

Building a malicious file with cmd/go can cause can cause a write to an attacker-controlled file with partial control of the file content. The "#cgo pkg-config:" directive in a Go source file provides command-line arguments to provide to the Go pkg-config command. An attacker can provide a "--log-file" argument to this directive, causing pkg-config to write to an attacker-controlled location.

CVE-2025-61731 严重级别为 HIGH (7.8)，共索引 99 条受影响软件包构建记录，涉及 7 个发行版。

- **级别 / 评分**: HIGH (7.8)
- **受影响构建数**: 99
- **涉及发行版**: 7
- **已标明修复版本发行版**: Alibaba Cloud Linux, OpenAnolis, openSUSE, Oracle Linux, Red Hat Enterprise Linux

## Affected Packages

| Distribution | Release | Package | Version | Fixed In |
| --- | --- | --- | --- | --- |
| Alibaba Cloud Linux | 3 | golang | 1.25.7-1.0.1.al8 | 1.25.8-1.0.1.al8 |
| Alibaba Cloud Linux | 3 | golang-bin | 1.25.7-1.0.1.al8 | 1.25.8-1.0.1.al8 |
| Alibaba Cloud Linux | 3 | golang-docs | 1.25.7-1.0.1.al8 | 1.25.8-1.0.1.al8 |
| Alibaba Cloud Linux | 3 | golang-misc | 1.25.7-1.0.1.al8 | 1.25.8-1.0.1.al8 |
| Alibaba Cloud Linux | 3 | golang-race | 1.25.7-1.0.1.al8 | 1.25.8-1.0.1.al8 |
| Alibaba Cloud Linux | 3 | golang-src | 1.25.7-1.0.1.al8 | 1.25.8-1.0.1.al8 |
| Alibaba Cloud Linux | 3 | golang-tests | 1.25.7-1.0.1.al8 | 1.25.8-1.0.1.al8 |
| Alibaba Cloud Linux | 3 | go-toolset | 1.25.7-1.0.1.al8 | 1.25.8-1.0.1.al8 |
| Alibaba Cloud Linux | 4 | golang | 1.24.11-1.alnx4 | 1.24.13-1.alnx4 |
| Alibaba Cloud Linux | 4 | golang-bin | 1.24.11-1.alnx4 | 1.24.13-1.alnx4 |
| Alibaba Cloud Linux | 4 | golang-docs | 1.24.11-1.alnx4 | 1.24.13-1.alnx4 |
| Alibaba Cloud Linux | 4 | golang-misc | 1.24.11-1.alnx4 | 1.24.13-1.alnx4 |
| Alibaba Cloud Linux | 4 | golang-shared | 1.24.11-1.alnx4 | 1.24.13-1.alnx4 |
| Alibaba Cloud Linux | 4 | golang-src | 1.24.11-1.alnx4 | 1.24.13-1.alnx4 |
| Alibaba Cloud Linux | 4 | golang-tests | 1.24.11-1.alnx4 | 1.24.13-1.alnx4 |
| Debian | trixie | golang-1.24 | 1.24.4-1 | — |
| Debian | trixie | golang-1.24-doc | 1.24.4-1 | — |
| Debian | trixie | golang-1.24-go | 1.24.4-1 | — |
| Debian | trixie | golang-1.24-src | 1.24.4-1 | — |
| OpenAnolis | 23.4 | golang | 1.24.11-1.an23 | 1.24.11-2.an23 |
| OpenAnolis | 23.4 | golang-bin | 1.24.11-1.an23 | 1.24.11-2.an23 |
| OpenAnolis | 23.4 | golang-docs | 1.24.11-1.an23 | 1.24.11-2.an23 |
| OpenAnolis | 23.4 | golang-misc | 1.24.11-1.an23 | 1.24.11-2.an23 |
| OpenAnolis | 23.4 | golang-shared | 1.24.11-1.an23 | 1.24.11-2.an23 |
| OpenAnolis | 23.4 | golang-src | 1.24.11-1.an23 | 1.24.11-2.an23 |
| OpenAnolis | 23.4 | golang-tests | 1.24.11-1.an23 | 1.24.11-2.an23 |
| openSUSE | 15.6 | coredns | 1.14.0-bp156.4.13.1 | 1.14.2-bp156.4.16.1 |
| openSUSE | 15.6 | coredns-extras | 1.14.0-bp156.4.13.1 | 1.14.2-bp156.4.16.1 |
| openSUSE | 15.6 | go1.24 | 1.24.11-150000.1.50.1 | 1.24.12-150000.1.53.1 |
| openSUSE | 15.6 | go1.24-doc | 1.24.11-150000.1.50.1 | 1.24.12-150000.1.53.1 |
| openSUSE | 15.6 | go1.24-openssl | 1.24.7-150600.13.12.1 | 1.24.12-150600.13.15.1 |
| openSUSE | 15.6 | go1.24-openssl-doc | 1.24.7-150600.13.12.1 | 1.24.12-150600.13.15.1 |
| openSUSE | 15.6 | go1.24-openssl-race | 1.24.7-150600.13.12.1 | 1.24.12-150600.13.15.1 |
| openSUSE | 15.6 | go1.24-race | 1.24.11-150000.1.50.1 | 1.24.12-150000.1.53.1 |
| openSUSE | 15.6 | go1.25 | 1.25.5-150000.1.23.1 | 1.25.6-150000.1.26.1 |
| openSUSE | 15.6 | go1.25-doc | 1.25.5-150000.1.23.1 | 1.25.6-150000.1.26.1 |
| openSUSE | 15.6 | go1.25-openssl | 1.25.1-150600.13.6.1 | 1.25.6-150600.13.9.1 |
| openSUSE | 15.6 | go1.25-openssl-doc | 1.25.1-150600.13.6.1 | 1.25.6-150600.13.9.1 |
| openSUSE | 15.6 | go1.25-openssl-race | 1.25.1-150600.13.6.1 | 1.25.6-150600.13.9.1 |
| openSUSE | 15.6 | go1.25-race | 1.25.5-150000.1.23.1 | 1.25.6-150000.1.26.1 |
| openSUSE | 15.6 | govulncheck-vulndb | 0.0.20260123T022811-150000.1.140.1 | 0.0.20260128T190828-150000.1.143.1 |
| Oracle Linux | 10 | golang | 1.25.7-1.el10_1 | 1.25.8-1.el10_1 |
| Oracle Linux | 10 | golang-bin | 1.25.7-1.el10_1 | 1.25.8-1.el10_1 |
| Oracle Linux | 10 | golang-docs | 1.25.7-1.el10_1 | 1.25.8-1.el10_1 |
| Oracle Linux | 10 | golang-misc | 1.25.7-1.el10_1 | 1.25.8-1.el10_1 |
| Oracle Linux | 10 | golang-race | 1.25.7-1.el10_1 | 1.25.8-1.el10_1 |
| Oracle Linux | 10 | golang-src | 1.25.7-1.el10_1 | 1.25.8-1.el10_1 |
| Oracle Linux | 10 | golang-tests | 1.25.7-1.el10_1 | 1.25.8-1.el10_1 |
| Oracle Linux | 10 | go-toolset | 1.25.7-1.el10_1 | 1.25.8-1.el10_1 |
| Oracle Linux | 8 | delve | 1.24.1-1.0.1.module+el8.10.0+90602+3daf471e | 1.25.2-1.0.1.module+el8.10.0+90715+2d4d8dfd |
| Oracle Linux | 8 | golang | 1.25.7-1.module+el8.10.0+90804+12f38c29 | 1.25.8-1.module+el8.10.0+90863+afbc39cb |
| Oracle Linux | 8 | golang-bin | 1.25.7-1.module+el8.10.0+90804+12f38c29 | 1.25.8-1.module+el8.10.0+90863+afbc39cb |
| Oracle Linux | 8 | golang-docs | 1.25.7-1.module+el8.10.0+90804+12f38c29 | 1.25.8-1.module+el8.10.0+90863+afbc39cb |
| Oracle Linux | 8 | golang-misc | 1.25.7-1.module+el8.10.0+90804+12f38c29 | 1.25.8-1.module+el8.10.0+90863+afbc39cb |
| Oracle Linux | 8 | golang-race | 1.25.7-1.module+el8.10.0+90804+12f38c29 | 1.25.8-1.module+el8.10.0+90863+afbc39cb |
| Oracle Linux | 8 | golang-src | 1.25.7-1.module+el8.10.0+90804+12f38c29 | 1.25.8-1.module+el8.10.0+90863+afbc39cb |
| Oracle Linux | 8 | golang-tests | 1.25.7-1.module+el8.10.0+90804+12f38c29 | 1.25.8-1.module+el8.10.0+90863+afbc39cb |
| Oracle Linux | 8 | go-toolset | 1.25.7-1.module+el8.10.0+90804+12f38c29 | 1.25.8-1.module+el8.10.0+90863+afbc39cb |
| Oracle Linux | 9 | golang | 1.25.7-1.el9_7 | 1.25.8-1.el9_7 |
| Oracle Linux | 9 | golang-bin | 1.25.7-1.el9_7 | 1.25.8-1.el9_7 |
| Oracle Linux | 9 | golang-docs | 1.25.7-1.el9_7 | 1.25.8-1.el9_7 |
| Oracle Linux | 9 | golang-misc | 1.25.7-1.el9_7 | 1.25.8-1.el9_7 |
| Oracle Linux | 9 | golang-race | 1.25.7-1.el9_7 | 1.25.8-1.el9_7 |
| Oracle Linux | 9 | golang-src | 1.25.7-1.el9_7 | 1.25.8-1.el9_7 |
| Oracle Linux | 9 | golang-tests | 1.25.7-1.el9_7 | 1.25.8-1.el9_7 |
| Oracle Linux | 9 | go-toolset | 1.25.7-1.el9_7 | 1.25.8-1.el9_7 |
| Red Hat Enterprise Linux | 10.2 | golang | 1.25.7-1.el10_1 | 1.25.8-1.el10_1 |
| Red Hat Enterprise Linux | 10.2 | golang-bin | 1.25.7-1.el10_1 | 1.25.8-1.el10_1 |
| Red Hat Enterprise Linux | 10.2 | golang-docs | 1.25.7-1.el10_1 | 1.25.8-1.el10_1 |
| Red Hat Enterprise Linux | 10.2 | golang-misc | 1.25.7-1.el10_1 | 1.25.8-1.el10_1 |
| Red Hat Enterprise Linux | 10.2 | golang-race | 1.25.7-1.el10_1 | 1.25.8-1.el10_1 |
| Red Hat Enterprise Linux | 10.2 | golang-src | 1.25.7-1.el10_1 | 1.25.8-1.el10_1 |
| Red Hat Enterprise Linux | 10.2 | golang-tests | 1.25.7-1.el10_1 | 1.25.8-1.el10_1 |
| Red Hat Enterprise Linux | 10.2 | go-toolset | 1.25.7-1.el10_1 | 1.25.8-1.el10_1 |
| Red Hat Enterprise Linux | 9.8 | golang | 1.25.7-1.el9_7 | 1.25.8-1.el9_7 |
| Red Hat Enterprise Linux | 9.8 | golang-bin | 1.25.7-1.el9_7 | 1.25.8-1.el9_7 |
| Red Hat Enterprise Linux | 9.8 | golang-docs | 1.25.7-1.el9_7 | 1.25.8-1.el9_7 |
| Red Hat Enterprise Linux | 9.8 | golang-misc | 1.25.7-1.el9_7 | 1.25.8-1.el9_7 |
| Red Hat Enterprise Linux | 9.8 | golang-race | 1.25.7-1.el9_7 | 1.25.8-1.el9_7 |
| Red Hat Enterprise Linux | 9.8 | golang-src | 1.25.7-1.el9_7 | 1.25.8-1.el9_7 |
| Red Hat Enterprise Linux | 9.8 | golang-tests | 1.25.7-1.el9_7 | 1.25.8-1.el9_7 |
| Red Hat Enterprise Linux | 9.8 | go-toolset | 1.25.7-1.el9_7 | 1.25.8-1.el9_7 |
| Ubuntu | focal | golang-1.13 | 1.13.8-1ubuntu1 | — |
| Ubuntu | focal | golang-1.13-doc | 1.13.8-1ubuntu1 | — |
| Ubuntu | focal | golang-1.13-go | 1.13.8-1ubuntu1 | — |
| Ubuntu | focal | golang-1.13-src | 1.13.8-1ubuntu1 | — |
| Ubuntu | focal | golang-1.14 | 1.14.2-1ubuntu1 | — |
| Ubuntu | focal | golang-1.14-doc | 1.14.2-1ubuntu1 | — |
| Ubuntu | focal | golang-1.14-go | 1.14.2-1ubuntu1 | — |
| Ubuntu | focal | golang-1.14-src | 1.14.2-1ubuntu1 | — |
| Ubuntu | jammy | golang-1.17-doc | 1.17.3-1ubuntu2 | — |
| Ubuntu | jammy | golang-1.18 | 1.18.1-1ubuntu1 | — |
| Ubuntu | jammy | golang-1.18-doc | 1.18.1-1ubuntu1 | — |
| Ubuntu | jammy | golang-1.18-go | 1.18.1-1ubuntu1 | — |
| Ubuntu | jammy | golang-1.18-src | 1.18.1-1ubuntu1 | — |
| Ubuntu | noble | golang-1.22 | 1.22.2-2 | — |
| Ubuntu | noble | golang-1.22-doc | 1.22.2-2 | — |
| Ubuntu | noble | golang-1.22-go | 1.22.2-2 | — |
| Ubuntu | noble | golang-1.22-src | 1.22.2-2 | — |
