
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
PyNaCl
Advanced tools
.. image:: https://img.shields.io/pypi/v/pynacl.svg :target: https://pypi.org/project/PyNaCl/ :alt: Latest Version
PyNaCl is a Python binding to libsodium, which is a fork of the
Networking and Cryptography library. These libraries have a stated goal of
improving usability, security and speed. It supports Python 3.8+ as well as
PyPy 3.
.. _libsodium: https://github.com/jedisct1/libsodium .. _Networking and Cryptography library: https://nacl.cr.yp.to/
Changelog_.. _Changelog: https://pynacl.readthedocs.io/en/latest/changelog/
PyNaCl ships as a binary wheel on macOS, Windows and Linux manylinux1 [#many]_ ,
so all dependencies are included. Make sure you have an up-to-date pip
and run:
.. code-block:: console
$ pip install pynacl
You can define the environment variable LIBSODIUM_MAKE_ARGS to pass arguments to make
and enable parallelization_:
.. code-block:: console
$ LIBSODIUM_MAKE_ARGS=-j4 pip install pynacl
PyNaCl relies on libsodium_, a portable C library. A copy is bundled
with PyNaCl so to install you can run:
.. code-block:: console
$ pip install pynacl
If you'd prefer to use the version of libsodium provided by your
distribution, you can disable the bundled copy during install by running:
.. code-block:: console
$ SODIUM_INSTALL=system pip install pynacl
.. warning:: Usage of the legacy easy_install command provided by setuptools
is generally discouraged, and is completely unsupported in PyNaCl's case.
.. _parallelization: https://www.gnu.org/software/make/manual/html_node/Parallel.html
.. _libsodium: https://github.com/jedisct1/libsodium
.. [#many] manylinux1 wheels <https://www.python.org/dev/peps/pep-0513/>_
are built on a baseline linux environment based on Centos 5.11
and should work on most x86 and x86_64 glibc based linux environments.
GNU Make (gmake) may be required for newer versions of PyNaCl. You can
set the binary to use by setting the MAKE environment variable:
.. code-block:: console
$ MAKE=gmake pip install pynacl
libsodium to 1.0.20-stable (2025-12-31 build) to resolve
CVE-2025-69277.MAKE environment variable can now be used to specify the make
binary that should be used in the build process.crypto_core_ed25519_from_uniform.libsodium to 1.0.20-stable (2025-08-27 build).manylinux1
wheels.manylinux2014, manylinux_2_24, musllinux, and macOS
universal2 wheels (the latter supports macOS arm64).libsodium to 1.0.18-stable (July 25, 2021 release).libsodium to 1.0.18.manylinux1
wheels. Continuing to produce them was a maintenance burden.wheel and setuptools setup_requirements in setup.py (#485)SODIUM_INSTALL_MINIMAL=1) for setup.libsodium to 1.0.16.libsodium to 1.0.15.manylinux1 binary wheelsSealedBox construction.argon2i and argon2id password hashing constructs
and restructured high-level password hashing implementation to expose
the same interface for all hashers.siphashx24 variant of siphash24.from_seed APIs for X25519 key pair generation.nacl.utils.shared_key() method on Box.None to nonce when encrypting with Box or
SecretBox and it will automatically generate a random nonce.siphash24.blake2b.scrypt.libsodium to 1.0.11.libsodium when compiling.nacl.exceptions.CryptoErrornacl.c.*) has been changed to match the
upstream NaCl C/C++ conventions (as well as those of other NaCl bindings).
The order of arguments and return values has changed significantly. To
avoid silent failures, nacl.c has been removed, and replaced with
nacl.bindings (with the new argument ordering). If you have code which
calls these functions (e.g. nacl.c.crypto_box_keypair()), you must review
the new docstrings and update your code/imports to match the new
conventions.FAQs
Python binding to the Networking and Cryptography (NaCl) library
We found that PyNaCl demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.