pypi pyspnego 0.13.0
v0.13.0

one hour ago

0.13.0 - 2026-12-03

  • Treat an installed GSSAPI provider with a missing native runtime as unavailable, allowing other authentication providers to work.
  • Fix the pyspnego-parse console script failing with TypeError: main() missing 1 required positional argument: 'args'
  • Security fixes for the NTLM acceptor
    • Fix authentication bypass where an AUTHENTICATE message with only an LM response and NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY was accepted without knowledge of the password
      • With extended session security the LM response contains no password derived data, an NT response is now required
    • Reject an AUTHENTICATE message whose MsvAvFlags state a MIC is present but has been modified to remove the MIC
    • When the acceptor has channel bindings, reject NTLMv1 responses as they cannot provide channel bindings
    • Use constant time comparisons for the NT/LM responses, MIC, and message signatures
  • The NTLM initiator now only uses the flags it requested from the CHALLENGE message
  • The NTLM initiator now fails if the acceptor does not negotiate 128-bit encryption, matching the Windows default for the Minimum session security for NTLM SSP based clients policy
    • Set the env var NTLM_ALLOW_WEAK_KEYS=1 to allow 40 or 56-bit keys with legacy acceptors
    • This env var is temporary and will be removed in a future version once it is known whether it is needed in real world scenarios, please open an issue if you need to set it
  • Security fixes for the SPNEGO initiator
    • Require the acceptor's mechListMIC when the acceptor selected a mech other than the initiator's preferred mech or sent request-mic, as per RFC 4178, to detect the mech list being altered to downgrade the mech
    • Only treat the negotiation as complete on accept-completed once the mech context has also completed
    • Fail when the acceptor selects a mech that was not offered
  • Fix the SPNEGO acceptor passing the initiator's optimistic token to a mech it was not created for
    • An acceptor without Kerberos failed when a Windows client offered Kerberos first, it now discards the token and continues with the next common mech like NTLM as per RFC 4178
    • The request-mic state is now based on the mech selected rather than the acceptor's preferred mech
  • Fail when a completed SPNEGO context receives a NegTokenInit or no token rather than restarting the negotiation while still reporting it is complete
  • Fix SPNEGO new_context() not keeping the credentials of the original context and only supporting the mech that was selected by the original context
  • Fix GSSAPI GSS_S_BAD_NAME and GSS_S_BAD_MIC errors not being mapped to BadNameError and BadMICError
  • Fix the memory leak of the in-memory Kerberos credential cache created for a Password or KerberosKeytab credential with GSSAPI
    • The cache, containing the TGT, was never destroyed and is now destroyed once the credential is no longer used
  • Security fixes for the CredSSP acceptor
    • Require a 32 byte clientNonce when CredSSP version 5 or newer is negotiated, an initiator could omit it to bypass credssp_min_protocol and use the public key binding without the CVE-2018-0886 mitigations
    • Use a constant time comparison for the pubKeyAuth value
  • Fix CredSSP new_context() not keeping the credssp_tls_context and credssp_min_protocol settings
    • The new context used the default TLS context, which does not verify the server certificate, and allowed any CredSSP version
  • Read the CredSSP TLS data in 16 KiB chunks, the size of a TLS record, rather than 1 KiB to speed up unwrap() on large messages

What's Changed

New Contributors

Full Changelog: v0.12.4...v0.13.0

Don't miss a new pyspnego release

NewReleases is sending notifications on new releases.