Exhibit 23.1 CONSENT OF INDEPENDENT ACCOUNTANTS We hereby consent to the incorporation by reference in the Registration Statements on Form S-3 (File Nos. 333-109734, 333-103660, 333-108023, 333-64943, 333-32186, 333-75862) and Form S-8 (File Nos. 333-49522, 333-32178, 333-65385, 333-65383, 333-25707, 333-54140, 333-60168, 333-60152, 333-99739, 333-101908, 333-106388) of Cubist Pharmaceuticals, Inc. of our report dated March 11, 2004 relating to the financial statements which appears in this Form 10-K. /s/ PricewaterhouseCoopers LLP Boston, Massachusetts March 12, 2004