What programming languages are best for cyber security?

Depending on the subfield you pick as your specialization you might have to learn some of these languages:

  • Python: Good all round scripting language, ideally suited to automate boring, repetitive stuff that will come up during your job. Powerful even for computing intensive tasks because you can interface modules written in C very easily, combining the development speed of Python with the execution speed of C
  • Bash: Same as Python but restricted to Linux specific stuff and even slower than Python.
  • Various proprietary scripting languages: Mostly if you go into Networks and Network security, many appliance manufacturers have their own languages to control their hardware. Knowing it will make your job easier.
  • Haskell, Agda, Coq/Inria: (In descending order of usefulness for real-life tasks) Interesting languages to reason about cryptography and other math-intensive systems. Maybe you will use one of those languages if you go into academia as cryptanalyst or developer of cryptography protocols, but that is a big maybe.
  • C: Pretty much every OS and 90% of the libraries and frameworks are written in it. If you want to find the weaknesses in a system from the point of view of a white-hat-hacker or pen tester, C will help you a lot.
  • Assembly: Another big maybe. Assuming you go into the security of embedded systems and Internet of Things, you might have use for some assembly dialects.

There are no languages that you must know to be successful in cybersecurity.

In short: none.