GoApplication · Golang

CVE-2025-0913

MEDIUM · 5.5 CVSS v3.1 Published 2025-06-11
Fix available
A fix is available. Upgrade to 1.23.10 / 1.24.4 or later.
See remediation →
57/100
Remediation priority · Elevated
Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
os.OpenFile(path, os.O_CREATE|O_EXCL) behaved differently on Unix and Windows systems when the target path was a dangling symlink. On Unix systems, OpenFile with O_CREATE and O_EXCL flags never follows symlinks. On Windows, when the target path was a symlink to a nonexistent location, OpenFile would create a file in that location. OpenFile now always returns an error when the O_CREATE and O_EXCL flags are both set and the target path is a symlink.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Go's os.OpenFile with O_CREATE and O_EXCL flags had a cross-platform inconsistency where Windows would follow symlinks and create files at the target location (even if nonexistent), while Unix systems correctly refused to follow symlinks. This has been fixed to always return an error when both flags are set and the target path is a symlink.

MitigationApplications relying on the previous Windows-specific behavior of creating files via dangling symlinks need to be updated to handle the new error or use alternative file creation methods. Upgrade to the patched Go version.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
GoApplication
Affected:< 1.23.10>= 1.24.0, < 1.24.4

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Local
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check installed Go version
    Run `go version` and note the version number (e.g., go1.23.5, go1.24.2)
    Affected if The version is less than 1.23.10, or greater than or equal to 1.24.0 but less than 1.24.4 (e.g., 1.23.0-1.23.9 or 1.24.0-1.24.3)
  2. Identify os.OpenFile usage with O_CREATE and O_EXCL
    Search source code for patterns like `os.OpenFile` combined with `os.O_CREATE|os.O_EXCL` or `os.O_CREATE & os.O_EXCL` or the flag values 0x08|0x04
    Affected if The codebase contains OpenFile calls using both O_CREATE and O_EXCL flags on file paths that may resolve to symlinks
  3. Verify symlink presence in file paths on Windows
    On Windows systems, enumerate file paths passed to OpenFile with O_CREATE/O_EXCL and check if any path component is a symbolic link using `dir /L` or PowerShell `Get-Item -Path <path> | Select-Object -ExpandProperty LinkType`
    Affected if On Windows, any file path passed to OpenFile with O_CREATE and O_EXCL resolves through a symlink (especially to a nonexistent target)
  4. Check for cross-platform file creation code
    Review code that creates files atomically (common for lock files, pid files, or temporary files) to see if it handles symlinks differently on Windows vs Unix
    Affected if The code relies on atomic file creation patterns using O_CREATE and O_EXCL and behaves differently on Windows than on Unix systems

You are affected if your Go version falls in the vulnerable ranges (below 1.23.10 or 1.24.0-1.24.3) AND your application uses os.OpenFile with both O_CREATE and O_EXCL flags on file paths that may be or contain symlinks, particularly on Windows.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 1.23.10 / 1.24.4 or later
Fixed in 1.23.101.24.4
Interim mitigation

Applications relying on the previous Windows-specific behavior of creating files via dangling symlinks need to be updated to handle the new error or use alternative file creation methods. Upgrade to the patched Go version.

Recommended fix High confidence

Go 1.23.10 or later (for 1.23.x branch); Go 1.24.4 or later (for 1.24.x branch)

  1. Check current Go version by running: go version
  2. Determine which branch you are on (1.23.x or 1.24.x) based on the current version
  3. If on Go 1.23.x: upgrade to Go 1.23.10 or later (e.g., go1.23.10, go1.23.11, etc.)
  4. If on Go 1.24.x: upgrade to Go 1.24.4 or later (e.g., go1.24.4, go1.24.5, etc.)
  5. Download the appropriate installer from https://go.dev/dl/
  6. Install the new version, which will overwrite the existing Go installation
  7. Verify the upgrade by running: go version
  8. Ensure any build pipelines or CI/CD systems are updated to use the new Go version
Caveat No breaking changes expected as this is a security fix that corrects behavior to be consistent across platforms; however, test on a staging environment first

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Go Scoped from the published advisory
  • Consultation3.0 h
  • Implementation2.0 h
  • Testing3.0 h
  • Review / QA2.0 h
10.0 hours of engineering $1,770
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,832.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-0913 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-0913 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data