According to WebMD, in general, it isn't dangerous to take Vicodin and ibuprofen together. For certain individuals or under specific circumstances, however, the combination isn't a good idea.
For instance, Vicodin is often prescribed for post-operative pain, WebMD explains; however, ibuprofen is a blood-thinner, which potentially makes it a poor choice for pain medication after surgery. In addition, if patients take other medications as well or have issues in their medical histories, doctors sometimes object to mixing the two drugs.
WebMD warns that another over-the-counter pain reliever, acetaminophen, should never be combined with Vicodin. The prescription drug already contains acetaminophen, and overdoses sometimes cause liver damage.