NeuVector Enforcer is vulnerable to Command Injection and Buffer overflow
        
  Critical severity
        
          GitHub Reviewed
      
        Published
          Oct 21, 2025 
          in
          
            neuvector/neuvector
          
          •
          Updated Oct 30, 2025 
      
  
Package
Affected versions
>= 5.3.0, < 5.3.5
      >= 5.4.0, <= 5.4.6
      >= 0.0.0-20230727023453-1c4957d53911, < 0.0.0-20251020133207-084a437033b4
  Patched versions
5.3.5
      5.4.7
      0.0.0-20251020133207-084a437033b4
  Description
        Published to the GitHub Advisory Database
      Oct 21, 2025 
    
  
        Reviewed
      Oct 21, 2025 
    
  
        Published by the National Vulnerability Database
      Oct 30, 2025 
    
  
        Last updated
      Oct 30, 2025 
    
  
Impact
A vulnerability was identified in NeuVector, where the enforcer used environment variables
CLUSTER_RPC_PORTandCLUSTER_LAN_PORTto generate a command to be executed viapopen, without first sanitising their values.The entry process of the enforcer container is the monitor process. When the enforcer container stops, the monitor process checks whether the consul subprocess has exited. To perform this check, the monitor process uses the
popenfunction to execute a shell command that determines whether the ports used by the consul subprocess are still active.The values of environment variables
CLUSTER_RPC_PORTandCLUSTER_LAN_PORTare used directly to compose shell commands via popen without validation or sanitization. This behavior could allow a malicious user to inject malicious commands through these variables within the enforcer container.In the patched version, the monitor process validates the values of
CLUSTER_RPC_PORTandCLUSTER_LAN_PORTto ensure they contain only valid port numbers before invoking thepopencommand.If validation fails, the monitor process exits immediately, causing the enforcer container to terminate. This prevents the execution of any injected or malicious commands.
Patches
Patched versions include release
v5.4.7and above.Workarounds
There is no workaround for this issue. Users are recommended to upgrade, as soon as possible, to a version of NeuVector that contains the fix.
References
If you have any questions or comments about this advisory:
References