← ALL ADVISORIES

LOW BYTERAY-2026-0434Disclosed

wolfSSL — Reduced Compiler Warning Level in Release Configurations of the Visual Studio Library Project

wolfssl.vcxproj compiles its six Debug configurations at warning level 4 and its six Release configurations at level 3, and no configuration treats warnings as errors. Release builds see fewer diagnostics than Debug builds. This is a build-hardening observation and not a vulnerability in the library code.

Advisory
BYTERAY-2026-0434
CWE
CWE-1127
CVSS
2.5 (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L)
Vendor
wolfSSL
Product
wolfSSL
Reported
2026-09-28
Disclosure
2026-12-03
Affected
wolfSSL 5.9.2 through 5.9.4, Windows builds from wolfssl.vcxproj in the Release and DLL Release configurations
Credit
Mehrun P. Hunter and Shahriyar Jalayeri, ByteRay Ltd.

Executive Summary

The repository ships Visual Studio projects for building the library on Windows. In the main one, wolfssl.vcxproj, the Debug and DLL Debug configurations set the MSVC warning level to Level4. The Release and DLL Release configurations set it to Level3. No configuration sets TreatWarningAsError, in this project or in any other project file in the tree.

Two things follow. A diagnostic that MSVC only issues at level 4 is never shown in a Release build. And in every configuration a warning is printed and the build carries on. The Debug configurations also switch off three level 4 warnings for the whole project: C4206, C4214 and C4706. C4706 is the warning for an assignment inside a conditional expression.

This advisory records the settings for integrators who build Windows binaries from the shipped project. It does not describe a flaw that an attacker can reach. No input to the library is involved, and the advisory does not identify a defect that these settings hide.

Affected Products and Versions

  • Component: Visual Studio project wolfssl.vcxproj. wolfssl-VS2022.vcxproj has the same split: six Level4 entries with the same suppression list and six Level3 entries.
  • Condition: the library is built with MSBuild or Visual Studio from these projects. The level 3 setting applies to Release and DLL Release on Win32, x64 and ARM64. The missing warnings-as-errors switch applies to all twelve configurations.
  • Tested: wolfSSL master d95483fff72d6e987394b72edca433d4b580a0f4 (version string 5.9.2).
  • The v5.9.2-stable and v5.9.4-stable tags have the same settings in every configuration.
  • Not changed on master as of 2026-12-03.
  • A default ./configure build does not use these files. Earlier releases were not checked.

Technical Details

A Debug configuration, at wolfssl.vcxproj:243-245:

      <WarningLevel>Level4</WarningLevel>
      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
      <DisableSpecificWarnings>4206;4214;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings>

The matching Release configuration, at wolfssl.vcxproj:344-345:

      <WarningLevel>Level3</WarningLevel>
      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

The full picture in the file:

  1. Level4 with the suppression list in the six Debug configurations: wolfssl.vcxproj:243, wolfssl.vcxproj:258, wolfssl.vcxproj:278, wolfssl.vcxproj:292, wolfssl.vcxproj:311 and wolfssl.vcxproj:325.
  2. Level3 with no suppression list in the six Release configurations: wolfssl.vcxproj:344, wolfssl.vcxproj:358, wolfssl.vcxproj:376, wolfssl.vcxproj:390, wolfssl.vcxproj:408 and wolfssl.vcxproj:422.
  3. TreatWarningAsError does not appear in the file. A search of the tested tree finds it in no project or property file.

The suppression list sits only in the Debug configurations. The Release configurations do not need it: C4206, C4214 and C4706 are level 4 warnings, so a level 3 build does not issue them. The outcome is that C4706 is not reported in any configuration of this project.

Reachability and Preconditions

  • The library is built from wolfssl.vcxproj or wolfssl-VS2022.vcxproj.
  • The person running the build controls the settings and can change them. There is no attacker position, authentication state or user interaction to describe: nothing at run time depends on a warning level.

Impact

Confirmed: Release builds from this project are compiled with fewer diagnostics than Debug builds, an assignment inside a condition is not reported in either, and no MSVC warning fails a build.

That is a reduction in what the compiler tells the person building. It has a security consequence only if the tree contains a defect that MSVC would report at level 4 and that nothing else catches. None is identified here. Code that is not specific to Windows is also compiled under the autotools warning set (m4/ax_harden_compiler_flags.m4:119-161), so the MSVC level is not the only check it receives. No memory-safety or cryptographic weakness follows from the setting itself.

ByteRay did not build a proof of concept for this issue. The analysis is from source review.

Remediation and Mitigation

Not fixed on wolfSSL master as of commit e4b0841b32e7 (2026-12-03). The warning settings in wolfssl.vcxproj there are the same.

A change, if upstream wants one, would set Level4 in the Release configurations so that both kinds of build see the same diagnostics, and review whether the project-wide C4706 suppression can be replaced by local ones. Turning on TreatWarningAsError is a further step that needs the sources to build clean at the chosen level first, which was not tested for this advisory.

Integrators who want stricter builds can change the two settings in their copy of the project or apply them from a property sheet. The cost is build breaks when a compiler update adds warnings.

Timeline

  • 2026-09-28 — Reported to wolfSSL.
  • 2026-12-03 — Public disclosure.

Credits

Discovered and reported by Mehrun P. Hunter and Shahriyar Jalayeri of ByteRay Ltd.

References