Safeguard
Developer Tools•

What does a version like 1.2.11#9 mean in vcpkg?

In vcpkg, 1.2.11#9 is upstream version 1.2.11 with port version 9. How the four version schemes sort, and why it matters when checking a fix.

Safeguard Security Team
3 min read

In vcpkg, 1.2.11#9 means upstream version 1.2.11, port version 9. The number after the hash sign counts changes to vcpkg's own packaging files, such as patches or build fixes, made without a new upstream release. It starts at 0, is omitted when 0, and resets whenever the upstream version changes.

Why a fix can hide in the port version

An advisory names an upstream version: "fixed in 1.2.12". But a packaging team may patch a vulnerable release without waiting for a new upstream tag. In vcpkg that shows up as a higher port version on the same upstream version, for example 1.2.11 moving from #8 to #9.

So an alert that says "version 1.2.11 is affected" may not apply to 1.2.11#9, if the port carries a backported patch. Equally, the reverse mistake exists: assuming #9 is fixed because it is higher. Read the port's patch list and changelog to see what changed.

Debian-style backports have the same shape, as covered in how to judge a fixed version or a backported fix.

The versioning reference lists the rules for port versions: they start at 0 for the original version of the port, increase by 1 each time a vcpkg specific change is made that does not raise the package version, and reset to 0 when the package version is updated. Keep that in mind when you compare two builds of the same library.

The four version schemes

Microsoft's versioning reference defines schemes, and a manifest must use only one.

PropertyForSorting
versionDot separated numbersNumeric, section by section
version-semverSemantic versioningPer the semver rules
version-dateDates as YYYY-MM-DD, with optional suffix numbersBy date, then suffix
version-stringAnything elseNo sorting, exact match only

Port versions compare after the main version: 1.2.0 is lower than 1.2.0#1, which is lower than 1.2.0#10.

The gotcha: schemes are not compared

By design, vcpkg does not compare versions that use different schemes. The documentation's example: a version-string of 7.1.3 cannot be compared with a version of 7.1.4, even though the conversion looks obvious.

For you this means a minimum version constraint may not behave as you expect if the library's port uses an unusual scheme. For version-string ports, vcpkg cannot tell whether one version is newer, so the only reliable pin is the exact one.

Steps to use this when handling an advisory

  1. Find the library's current port version in your vcpkg_installed tree or lockfile equivalent.
  2. Look up the advisory's fixed upstream version.
  3. If your upstream version is below it, raise the constraint or baseline.
  4. If it is the same, read the port's patches for the fix before deciding.
  5. Write the full string, including the hash and port number, in your records.

For constraint syntax, see vcpkg baseline vs overrides.

Quick check

Is 1.2.11#9 newer than 1.2.11?

Yes, by port version. Both use upstream 1.2.11, but the first has nine packaging revisions.

Why is the hash omitted sometimes?

A port version of 0 is written without the suffix, so 1.2.11 means 1.2.11 port version 0.

Safeguard's SBOM and dependency scanning can build an inventory of the components in a repository, and the free scan at gold.safeguard.sh/scan is a quick way to see what turns up.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.