Clarification regarding CVE-2026-39006

We use snmp4j-agent 3.8.3, snmp4j-agentx 3.6.1 and snmp4j 3.12.2 on a Java 11 runtime. We need snmp4j-agent 3.9.0 for CVE-2026-39006
(3.8.3 and below are flagged vulnerable; 3.9.0 is the first clean release).
The upgrade is blocked inside the 3PPs: snmp4j-agent 3.9.0 changed AgentConfigManager.launchTransportMappings(Collection) and stopTransportMappings(Collection) from static to instance methods, while snmp4j-agentx 3.6.1 still calls both with invokestatic. This breaks four call sites covering AgentX startup and shutdown on both master and subagent sides, failing at runtime with java.lang.IncompatibleClassChangeError: Expected static method ‘void org.snmp4j.agent.AgentConfigManager.launchTransportMappings(java.util.Collection)’.
The build itself succeeds with no error or warning, because our own source never references these methods. The only agentx release with the matching invoke virtual fix is 4.2.0, but every agentx 4.x is Java 17 bytecode (class file 61) and fails on Java 11 with UnsupportedClassVersionError.
So there is no valid version combination for Java 11.

Can you let us know if there is dependency on agentx 4.x with snmp4j-agent 3.9.0 as we do not see about this dependency in snmp4j-agent 3.9.0. If the dependency exists, please let us know if we have agentx version compatible with java 11 and also supports dependency with snmp4j-agent 3.9.0 where the CVE is fixed.

The short answer is: stay at the versions you currently are, if you cannot upgrade to Java 17.
The CVE you mentioned can be easily avoided by doing the right configuration of the agent.
To be 100% on the save side, harden your VACM config (do not allow any noAuth and noPriv access) and do not add the Snmp4jConfigMib to your agent.

I will add other options here later for those who want to use the Snmp4jConfigMib in Production…

Hi,
Thanks for your clarification. Based on the problem which we reported could you please clarify if this is a false-positive scenario in our case.
Since we have customers who are already using snmp4j-agent 3.8.3, snmp4j-agentx 3.6.1 and snmp4j 3.12.2 on a Java 11 runtime environment, can you provide us a fix which is supported in Java 11 runtime environment itself?

The CVE you mentioned is a configuration issue (when using the SampleAgent defaults). Nothing else. The implemented “fixes” make it easier to do a secure configuration.

Thus, on the existing systems:

  • If the MIB module Snmp4jConfigMib is NOT added to the agent by calling the initOptionalMIBs. Using the AgentConfigManager this is the default. To change that overwrite that method as shown by the second snippet:
    /**
     * Creates the instances of the optional MIB modules of this agent (SNMP4J-LOG-MIB,
     * SNMP4J-CONFIG-MIB, NOTIFICATION-LOG-MIB, SNMP4J-PROXY-MIB, and SNMP-USM-DH-OBJECTS-MIB).
     */
    protected void initOptionalMIBs() {
        initSnmp4jLogMIB();
        initSnmp4jConfigMIB(null);
        if ((vacm() != null) && (notificationMIB != null)) {
            initNotificationLogMIB(vacm(), notificationMIB);
        }
        initSnmp4jProxyMIB(getDefaultContext());
        initSnmpUsmDhObjectsMib();
    }

        agent = new AgentConfigManager(
                engineID,
                messageDispatcher,
                null,
                moServers,
                ThreadPool.create("SampleAgent", 3),
                configurationFactory,
                persistenceProvider, engineBootsProvider, 
                null, dhKickstartParameters) {

            @Override
            protected void initOptionalMIBs() {
                initSnmp4jLogMIB();
                if ((vacm() != null) && (notificationMIB != null)) {
                    initNotificationLogMIB(vacm(), notificationMIB);
                }
                initSnmpUsmDhObjectsMib();
            }

            @Override
            protected Session createSnmpSession(MessageDispatcher dispatcher) {
                Session session = super.createSnmpSession(dispatcher);
                snmpConfigurator.configure(session, getUsm(), messageDispatcher, args);
                return session;
            }
        };

  • If the do not want to change the code basis and Snmp4jConfigMib is part of the deployed agent then you need to exclude the access for the snmp4jCfgStorageTable from all view unrestricted views (check if other/custom views need to be changed too):
VacmMIB vacm = agent.getVacmMIB();
OID excluded = new OID("1.3.6.1.4.1.4976.10.1.1.2.1.2.1");
OctetString noMask = new OctetString(); // zero length => all sub-IDs significant

vacm.addViewTreeFamily(new OctetString("unrestrictedReadView"),   excluded, noMask,
                       VacmMIB.vacmViewExcluded, StorageType.readOnly);
vacm.addViewTreeFamily(new OctetString("unrestrictedWriteView"),  excluded, noMask,
                       VacmMIB.vacmViewExcluded, StorageType.readOnly);
vacm.addViewTreeFamily(new OctetString("unrestrictedNotifyView"), excluded, noMask,
                       VacmMIB.vacmViewExcluded, StorageType.readOnly);
...

You can apply these changes using a SNMP client (with full MIB access and auth/priv) during runtime as well. If you want them to be applied at compile time, place them here:

agent.configure();
agent.restoreState();
addVacmExclusions();   // the four statements above
agent.launch();

To fix this at runtime execute the following script with an user in unrestricted write view (for example SHA256AES128:

AGENT=127.0.0.1:4700                 # must match the SampleAgent listen address argument
PASS='<the -admin passkey>'
V3="-v3 -l authPriv -u SHA256AES128 -a SHA-256 -A $PASS -x AES -X $PASS"
VTF=1.3.6.1.6.3.16.1.5.2.1           # vacmViewTreeFamilyEntry

RV=20.117.110.114.101.115.116.114.105.99.116.101.100.82.101.97.100.86.105.101.119.14.1.3.6.1.4.1.4976.10.1.1.2.1.2.1
WV=21.117.110.114.101.115.116.114.105.99.116.101.100.87.114.105.116.101.86.105.101.119.14.1.3.6.1.4.1.4976.10.1.1.2.1.2.1
NV=22.117.110.114.101.115.116.114.105.99.116.101.100.78.111.116.105.102.121.86.105.101.119.14.1.3.6.1.4.1.4976.10.1.1.2.1.2.1

# 1) unrestrictedReadView
snmpset $V3 $AGENT $VTF.4.$RV i 2  $VTF.5.$RV i 3  $VTF.6.$RV i 4

# 2) unrestrictedWriteView
snmpset $V3 $AGENT $VTF.4.$WV i 2  $VTF.5.$WV i 3  $VTF.6.$WV i 4

# 3) unrestrictedNotifyView
snmpset $V3 $AGENT $VTF.4.$NV i 2  $VTF.5.$NV i 3  $VTF.6.$NV i 4

A back port of the Snmp4jConfigMib hardening will be released in a few days. Excluding the snmp4jCfgMIB (1.3.6.1.4.1.4976.10.1.1.2) from all non-admin MIB views makes sense in any case!

SNMP4J-AgentX 3.6.2 is available now too!

I realised later from re-reading your post, that this is probably the best solution for you, because you then can upgrade to SNMP4J v3.13.1 and SNMP4J-Agent(-DB) 3.10.1 already.

The integration of audit log will only happen in the SNMP4J-AgentX 3.x branch if someone having a support contract is asking for.

1 Like

Thanks for releasing the fix package compatible with java 11