← ALL ADVISORIES

MEDIUM BYTERAY-2026-0359Disclosed

wolfSSL — Reduced Compiler Warning Level in the Release Configuration of the Legacy Visual Studio Project

The legacy Visual Studio 2008 project wolfssl.vcproj compiles Debug at warning level 4 with three warnings switched off and Release at level 3, and does not treat 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-0359
CWE
CWE-1127
CVSS
5.0 (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/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 the legacy wolfssl.vcproj project
Credit
Mehrun P. Hunter and Shahriyar Jalayeri, ByteRay Ltd.

Executive Summary

Besides the current Visual Studio projects, the repository keeps wolfssl.vcproj, a project in the Visual Studio 2008 format with two configurations, Debug|Win32 and Release|Win32. Both build the library as a static library.

The Debug configuration sets the MSVC warning level to 4 and disables warnings C4206, C4214 and C4706 for the whole project. The Release configuration sets level 3. Neither sets the warnings-as-errors option. A diagnostic that MSVC issues only at level 4 is not shown in a Release build, C4706 (assignment inside a conditional expression) is not shown in either, and a warning that is shown does not stop the build.

These are the same settings as in the current wolfssl.vcxproj, described in BYTERAY-2026-0434. This advisory 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: legacy Visual Studio project wolfssl.vcproj (format version 9.00, wolfssl.vcproj:4).
  • Condition: the library is built from this project file. Builds from wolfssl.vcxproj, CMake or autotools do not read it.
  • Tested: wolfSSL master d95483fff72d6e987394b72edca433d4b580a0f4 (version string 5.9.2).
  • The v5.9.2-stable and v5.9.4-stable tags have the same three settings on the same lines.
  • Not changed on master as of 2026-12-03. The file there is identical to the tested commit.
  • A default ./configure build does not use this file. Earlier releases were not checked.

Technical Details

The compiler tool of the Debug configuration, at wolfssl.vcproj:41-53, ends with:

                UsePrecompiledHeader="0"
                WarningLevel="4"
                DebugInformationFormat="4"
                DisableSpecificWarnings="4206,4214,4706"
            />

The compiler tool of the Release configuration, at wolfssl.vcproj:105-116, ends with:

                UsePrecompiledHeader="0"
                WarningLevel="3"
                DebugInformationFormat="3"
            />
  1. wolfssl.vcproj:20 opens Debug|Win32. It sets level 4 at wolfssl.vcproj:50 and the suppression list at wolfssl.vcproj:52.
  2. wolfssl.vcproj:83 opens Release|Win32. It sets level 3 at wolfssl.vcproj:114 and has no suppression list.
  3. The warnings-as-errors attribute of the compiler tool does not appear in the file. A search of the tested tree finds no project or property file that enables it.

The suppression list is only in the Debug configuration. The Release configuration does not need it: C4206, C4214 and C4706 are level 4 warnings, so a level 3 build does not issue them.

Reachability and Preconditions

  • The library is built from wolfssl.vcproj. The file is in the Visual Studio 2008 project format, so this means an old toolchain or a deliberate import of the old project.
  • 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: a Release build from this project is compiled with fewer MSVC diagnostics than a Debug build, 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. 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).

A change, if upstream wants one, would set level 4 in the Release configuration and review the project-wide C4706 suppression, as for wolfssl.vcxproj. Retiring the legacy project file would remove the question.

Integrators who build from wolfssl.vcproj can change the two settings in their copy. The cost is build breaks when the compiler reports something new.

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