PyBioNetGen 0.8.7 contains a code injection vulnerability in ParameterBlock.additem() and ModelBlock.additem() that allows attackers to execute Python code by passing parameter expressions to sympy.sympify(). Attackers can supply a crafted BNG-XML model file with Python code in a Parameter expr or value attribute to execute code as the user when loaded with bionetgen.bngmodel().