Is it illegal to publish an exploit against a known vulnerability in US? The exploit could be published in one's blog or places like exploit-DB. It seems that in countries like Germany and France such activities are not allowed.
Consult a lawyer for legal questions. Answers here won't help you if you get into trouble.
That being said, obviously there are a lot of researchers in the US publishing proof-of-concept code, and even the code that goes into tools like the metasploit framework. Also, there are some pages you can find from sources like the EFF's Coders' Rights Project.
Unless being explicitly asked to discover vulnerabilities in a specific system (e.g analyzing system vulnerability for a specific company), disclosing detailed information about a vulnerability and exploit methods which can then be used by and adversary to attack that specific system will allow the owning company to file a lawsuit against you. However, unless they file for a lawsuit, claiming you have put the company at some kind of risk, simply disclosing information about vulnerabilities and providing an exploit will not get you into trouble. Keep in mind that exploits are sometimes meant to prove that a specific vulnerability is dangerous and should be addressed.
As for the lawsuit, the charges you face will vary depending on the damage, but that doesn't mean for certain that you will face legal punishment. It can be argued that (as a consumer) disclosing vulnerabilities (or proof that the vulnerabilities are dangerous e.g exploits) about a product you consume is your legal right. As you have paid for the product/service, and you expect the highest quality of service, and certain vulnerabilities in that product can harm you and other customers.
However, if your exploit is used for any illegal activity (e.g causing the company financial damage) you will be legally responsible regardless of the company filing a lawsuit against you or not.