<PAGE>
 
* The confidential material contained herein has been omitted and filed
separately with the Commission.

                                                                 EXECUTION COPY
                                                                 --------------
                          MAGAININ PHARMACEUTICALS INC.

                         COMMON STOCK PURCHASE AGREEMENT

                                December 30, 1998

         THIS COMMON STOCK PURCHASE AGREEMENT (this "Agreement") is made as of
the date hereof by and between MAGAININ PHARMACEUTICALS INC., a Delaware
corporation (the "Company") having its principal executive office at 5110 Campus
Drive, Plymouth Meeting, Pennsylvania 19462, and GENENTECH, INC, a Delaware
corporation having its principal executive office at 1 DNA Way, South San
Francisco, California 94080 (the "Investor").

                                    RECITALS

         WHEREAS, the Company and the Investor are contemporaneously entering
into a Collaborative Research and Option Agreement (the "Option Agreement"),
pursuant to which the Investor will conduct research with respect to IL-9 and
the Company will grant the Investor an exclusive option to enter into an
agreement regarding the development and commercialization thereof; and

         WHEREAS, pursuant to the Option Agreement the parties have agreed to
enter into this Agreement; and;

         WHEREAS, the Company has authorized the sale and issuance of such
number of shares of its Common Stock, par value $.002 per share (the "Common
Stock"), as may be issued and sold pursuant to this Agreement (the "Shares");
and

         WHEREAS, the Investor desires to purchase the Shares on the terms and
conditions set forth herein; and

         WHEREAS, the Company desires to issue and sell the Shares to the
Investor on the terms and conditions set forth herein; and

         WHEREAS, the Shares shall have registration rights as evidenced by the
Registration Rights Agreement in the form attached hereto (the "Registration
Rights Agreement");

         NOW, THEREFORE, in consideration of the foregoing recitals and the
mutual promises hereinafter set forth,

         THE PARTIES HEREBY AGREE AS FOLLOWS:

         1.       Purchase and Sale of Stock.
                  --------------------------
 
                  1.1 Sale and Issuance of Common Stock. Subject to the terms
                      ---------------------------------
         and conditions of this Agreement, the Company hereby agrees to sell and
         issue to the Investor, and the Investor hereby agrees to purchase from
         the Company, that number of Shares set forth opposite the Investor's
         name on Exhibit A hereto at the per share purchase price equal to one
                 ---------
         hundred ten percent (110%) of the arithmetic average of the last sale
         price of one share of the Common Stock on the twenty
<PAGE>
 
         (20) trading days immediately prior to the date of the Closing (as
         defined below), as reported on the Nasdaq National Market (the "Per
         Share Purchase Price").

                  1.2 Initial Closing. The purchase and sale of the Shares
                      ---------------
         representing an aggregate consideration of Two Million Dollars
         ($2,000,000.42) of the Common Stock shall take place at the offices of
         Genentech, Inc., 1 DNA Way, South San Francisco, California 94080 (the
         "Genentech Offices"), at 10:00 a.m. California time on date hereof, or
         such other date and time as the Company and the Investor mutually agree
         orally or in writing (which time and place are designated as the
         "Initial Closing").

                 1.3 Contingent Subsequent Closings. In connection with the
                     ------------------------------ 
         Investor's exercise of its option (the "Option") granted pursuant to
         Section 3.1 of the Option Agreement, the Investor shall have the
         option, if agreed to by the Company, to purchase additional Shares of
         Common Stock pursuant to an agreement substantially in the form hereof,
         and the Company shall issue and sell such additional Shares to the
         Investor at one or more additional closings as may be agreed by the
         parties, at a price and subject to terms mutually agreed upon by the
         parties pursuant to this Agreement or such other agreement (such times
         and place are each designated as a "Subsequent Closing"). When used
         herein, the term "Closing", refers to the Initial Closing or each of
         the Subsequent Closings, as applicable. The parties shall update 
         Exhibit A hereto with each Subsequent Closing, if any, made pursuant to
         ---------
         this Agreement.

                 1.4 Delivery. At the Closing, the Company shall deliver to the
                     --------
        Investor a certificate registered in the Investor's name representing
        the Shares to be purchased by the Investor. Such delivery shall be
        against payment of the purchase price therefore in an amount equal to
        the product of the number of Shares and the Per Share Purchase Price by
        wire transfer to the Company's bank account at


                     Bank Name:         First Union National Bank 
                     Bank Address:      FC 3-90-1-3 
                                        2240 Butler Pike 
                                        Plymouth Meeting, PA 19462 
                     Bank Contact       John Berardinelli 
                     ABA#:              031-2014-67 
                     Account Name:      Magainin Pharmaceuticals Inc. 
                     Account Number:    (                )                     *


         2.       Representations and Warranties of the Company. Except as set 
                  ---------------------------------------------
forth in the Company's Annual Report on Form 10-K for the year ending December
31, 1997, and Quarterly Report on Form 10-Q as of September 30, 1998, or as set
forth on the Schedule of Exceptions attached hereto as Exhibit B, the Company
                                                       ---------  
hereby represents and warrants, to the best of the Company's knowledge and
belief, as follows:

                  2.1 Organization, Good Standing and Qualification. The Company
                      ---------------------------------------------
         is a corporation duly organized, validly existing and in good standing
         under the laws of the State of Delaware and has all requisite corporate
         power and authority to own and operate its properties and assets, and
         to carry on its business as currently conducted and as proposed to be
         conducted. The Company is duly qualified to transact business and is in
         good standing in each jurisdiction in which the failure to so qualify
         would have a material adverse effect on its business, as now conducted
         or as now proposed to be conducted, or properties. True and accurate
         copies of the Company's Certificate of


                                                  * THE CONFIDENTIAL MATERIAL 
                                        2           CONTAINED HEREIN HAS BEEN 
                                                    OMITTED AND HAS BEEN FILED 
                                                    SEPARATELY WITH THE 
                                                    COMMISSION
<PAGE>
 
         Incorporation (the "Articles") and the Company's Bylaws, each as in
         effect at the Initial Closing, are attached hereto as Exhibit C and
                                                               --------- 
         Exhibit D, respectively.
         ---------

                  2.2. Capitalization; Voting Rights. The authorized capital
                       -----------------------------
         stock of the Company, immediately prior to the Closing, will consist of
         45,000,000 shares of Common Stock, par value $.002 per share,
         22,289,863 shares of which are issued and outstanding and 9,211,000
         shares of Preferred Stock, par value $.001 per share, none of which are
         issued and outstanding. All issued and outstanding shares of the
         Company's Common Stock (a) have been duly authorized and validly issued
         (b) are fully paid and nonassessable, and (c) were issued in compliance
         with all applicable state and federal laws concerning the issuance of
         securities. The rights, preferences, privileges and restrictions of the
         Shares are as stated in the Articles. Other than the 3,876,345 shares
         reserved for issuance under the Company's Stock Option Plans, and
         except as may be granted pursuant to the Affiliated Agreements (as
         defined below), there are 2,144,236 shares of Common Stock reserved for
         other purposes. Of such reserved shares of Common Stock, (i) 596,625
         shares have been reserved pursuant to stock option agreements, and (ii)
         1,547,611 have been reserved pursuant to warrant agreements. When 
         issued in compliance with the provisions of this Agreement and the
         Articles, the Shares will be validly issued, fully paid and
         nonassessable, and will be free of any liens or encumbrances; provided
         however, that the Shares may be subject to restrictions on transfer
         under state and/or federal securities laws as set forth herein or as
         otherwise required by such laws at the time a transfer is proposed.

                  2.3. Subsidiaries. The Company does not presently own or
                       ------------
         control, directly or indirectly, any interest in any other corporation,
         association or other business entity. The Company is not a participant
         in any joint venture, partnership or similar arrangement.

                  2.4. Authorization. All corporate action on the part of the
                       -------------
         Company and its officers, directors and shareholders necessary for the
         authorization, execution and delivery of this Agreement, the
         Registration Rights Agreement and the Option Agreement (together with
         the Registration Rights Agreement, the "Affiliated Agreements"), the
         performance of all obligations of the Company hereunder and thereunder
         and under the Articles, and the authorization, issuance (or reservation
         for issuance), sale and delivery of the Shares being sold hereunder,
         has been taken or will be taken prior to the Closing, and this
         Agreement and the Affiliated Agreements constitute valid and legally
         binding obligations of the Company, enforceable in accordance with
         their respective terms, subject to: (i) judicial principles limiting
         the availability of specific performance, injunctive relief and other
         equitable remedies; (ii) bankruptcy, insolvency, reorganization,
         moratorium or other similar laws now or hereafter in effect generally
         relating to or affecting creditors' rights; and (iii) limitations on
         the enforceability of the indemnification provisions of the
         Registration Rights Agreement.

                  2.5 Valid Issuance of Common Stock. The Shares that are being
                      ------------------------------
         purchased by the Investor hereunder, when issued, sold and delivered in
         accordance with the terms of this Agreement for the consideration
         expressed herein, will be duly and validly issued (including, without
         limitation, issued in compliance with applicable state and federal
         securities laws), fully paid and nonassessable, will have the rights,
         preferences, privileges and instructions described in the Articles, and
         will be free of restrictions on transfer other than restrictions on
         transfer under this Agreement and the Registration Rights Agreement and
         under applicable state and federal securities laws. Subject to
         applicable restrictions on transfer, the issuance and delivery of the
         Shares are not subject to any preemptive or other similar rights or any
         liens or encumbrances except as specifically set forth in the Articles,
         this Agreement and the Registration Rights Agreement.



                                        3
<PAGE>
 
                  2.6. Governmental Consents. Based in part on the
                       ---------------------
         representations made by Investor in Section 3 of this Agreement, no
         consent, approval, order or authorization of, or registration,
         qualification, designation, declaration or filing with, any federal,
         state or local governmental authority on the part of the Company is
         required in connection with the offer, sale or issuance of the Shares,
         or the consummation of any other transaction contemplated by this
         Agreement or any of the Affiliated Agreements, except for (i) such
         filings under applicable securities laws and (ii) such filings with the
         Securities and Exchange Commission (the "Commission"), Nasdaq and
         others pursuant to this Agreement and the Registration Rights
         Agreement. The Company hereby agrees to make all such filings within
         the prescribed periods. Based in part on the representations of the
         Investor set forth in Section 3 below, the offer, sale and issuance of
         the Shares in conformity with the terms of this Agreement are exempt
         from the registration requirements of the Securities Act and from the
         qualification requirements of the California Securities Law.

                  2.7. Litigation. There is no action, suit, proceeding or
                       ----------
         investigation pending or currently threatened before any court,
         administrative agency or other governmental body against the Company
         that questions the validity of this Agreement or the Affiliated
         Agreements or the right of the Company to enter into any of them, or to
         consummate the transactions contemplated hereby or thereby, or that
         would result, either individually or in the aggregate, in any material
         adverse change in the condition (financial or otherwise), business,
         property, assets or liabilities of the Company or any change in the
         current equity ownership of the Company. The foregoing includes,
         without limitation, actions, suits, proceedings or investigations
         pending or threatened (or any basis therefor known to the Company)
         involving the prior employment of any of the Company's employees, their
         use in connection with the Company's business of any intellectual
         property, information or techniques allegedly proprietary to any of
         their former employers, or their obligations under any agreements with
         their former employers. The Company is not a party or subject to, and
         none of its assets us bound by, the provisions of any order, writ,
         injunction, judgment or decree of any court or government agency or
         instrumentality.

                  2.8. Employees. The Company's relations with its employees are
                       ---------
         satisfactory. The Company has no collective bargaining agreements with
         any of its employees. There is no labor union organizing activity
         pending or, to the Company's knowledge, threatened with respect to the
         Company. To the Company's knowledge, no employee of the Company, nor
         any consultant with whom the Company has contracted, is in violation of
         any term of any employment contract, proprietary information agreement
         or any other agreement relating to the right of any such individual to
         be employed by, or to contract with, the Company because of the nature
         of the business to be conducted by the Company; and to the Company's
         knowledge the continued employment by the Company of its present
         employees, and the performance of the Company's contracts with its
         independent contractors, will not result in any such violation. The
         Company has not received any notice alleging that any such violation
         has occurred. No employee of the Company has been granted the right to
         continued employment by the Company or to any material compensation
         following termination of employment with the Company. The Company is
         not aware that any officer or key employee, or that any group of key
         employees, intends to terminate his, her or their employment with the
         Company, nor does the Company have a present intention to terminate the
         employment of any officer, key employee or group of key employees. The
         Company has complied in all material respects with the applicable
         state, federal and foreign equal employment opportunity laws and with
         other laws related to employment.

                  2.9. Patents and Trademarks. The Company has sufficient title
                       ----------------------
         and ownership of all patents, trademarks, service marks, trade names,
         copyrights, trade secrets, information, proprietary


                                        4
<PAGE>
 
         rights and processes necessary for its business as presently conducted,
         without any known infringement of the rights of others. The Company has
         not received any communications alleging that the Company has violated
         any patents, trademarks, service marks, trade names, copyrights or
         trade secrets or other proprietary rights of any other person or entity
         nor is the Company aware of any third party that us infringing or
         violating any such rights of the Company. To the best knowledge of the
         Company, none of the Company's employees is obligated under any
         contract (including licenses, covenants or commitments of any nature)
         or other agreement, or subject to any judgment, decree or order of any
         court or administrative agency, that would interfere with the use of
         his or her best efforts to promote the interests of the Company or that
         would conflict in any manner with the Company's business. Neither the
         execution nor delivery of this Agreement or any of the Affiliated
         Agreements, nor the carrying on of the Company's business by the
         employees of the Company, will conflict with or result in a breach of
         the terms, conditions or provisions of, or constitute a default under,
         any contract, covenant or instrument under which any of such employees
         is now obligated. The Company does not and will not need to utilize any
         inventions of any of its employees (or people it currently intends to
         hire) made prior to their employment by the Company that have not
         previously been fully and exclusively assigned to the Company without
         restrictions, the presence of which would result in a material adverse
         effect on the ability of the Company to carry on its business as
         presently conducted or proposed to be conducted.

                  2.10. Confidential Information and Invention Assignment
                        -------------------------------------------------
         Agreements. Each former and current employee, officer and consultant of
         ----------
         the Company has executed an appropriate confidential information and
         invention assignment agreement. No current employee, officer or
         consultant of the Company has excluded works or inventions made prior
         to his or her employment with the Company from his or her assignment of
         inventions pursuant to such agreement.

                  2.11. Compliance with Other Instruments. The Company is not in
                        ---------------------------------
         violation or default of any provision of its Articles or Bylaws, each
         as in effect on and as of the Closing. The Company is not in violation
         or default of any material provision of any instrument, mortgage, deed
         of trust, loan, contract, commitment, judgment, decree, order or
         obligation to which it is a party or by which it or any of its
         properties or assets are bound, which violation or default would
         materially adversely affect the condition (financial or otherwise),
         business, property, assets or liabilities of the Company or, to the
         best of the Company's knowledge, of any provision of any federal, state
         or local statute, rule or governmental regulation, which violation or
         default would materially adversely affect the condition (financial or
         otherwise), business, property, assets or liabilities of the Company.
         The execution, delivery and performance of and compliance with this
         Agreement and the Affiliated Agreements, and the issuance and sale of
         the Shares, will not result in any such violation, be in conflict with
         or constitute (with or without the passage of time or giving of notice)
         a default under any such provision, require any consent or waiver under
         any such provision (other than any consents or waivers that have been
         obtained), or result in the creation of any mortgage, pledge, lien,
         encumbrance or charge upon any of the properties or assets of the
         Company pursuant to any such provision.

                  2.12 Ludwig Agreement. The Company has provided the Investor
                       ----------------
         with a full and complete (except for certain financial terms, which
         have been redacted) copy of the License Agreement, dated as of December
         20, 1996 (the "Ludwig Agreement"), by and between the Company and the
         Ludwig Institute for Cancer Research, a Swiss not-for-profit
         corporation ("Ludwig") which agreement is attached hereto as Exhibit E.
                                                                      ---------
         The Ludwig Agreement constitutes the full and entire understanding
         between the Company and Ludwig with respect to the subject matter of
         the Ludwig Agreement. The Company is not in violation or default of any
         provision of

                                        5
<PAGE>
 
         the Ludwig Agreement. The execution, delivery and performance of and
         compliance with this Agreement and the Affiliated Agreements, and the
         issuance and sale of the Shares, will not result in any such
         violation, be in conflict with or constitute (with or without the
         passage of time or giving of notice) a default under any such
         provision, require any consent or waiver under any such provision or
         result in the creation of any mortgage, pledge, lien encumbrance or
         charge upon any of the properties or assets of the Company pursuant to
         any such provision. The Company shall use its best efforts to maintain
         the Ludwig Agreement in full force and effect through one hundred
         twenty (120) days after the end of the Research Term (as defined in the
         Option Agreement).

                  2.13 Permits. The Company has all material franchises,
                       -------
         permits, licenses and any similar authority necessary for the conduct
         of its business as now being conducted by it, the lack of which would
         materially and adversely affect the business, properties, prospects or
         financial condition of the Company, and the Company believes it can
         obtain, without undue burden or expense, any similar authority for the
         conduct of its business as planned to be conducted. The Company is not
         in default under any of such franchises, permits, licenses or other
         similar authority and neither the execution, delivery nor performance
         of this Agreement and each of the Affiliated Agreements and the
         consummation of the transactions contemplated hereby and thereby will
         result in any suspension, revocation, impairment, forfeiture or
         nonrenewal of any permit, license, authorization or approval applicable
         to the Company, its business or operations or any of its assets or
         properties.

                  2.14. Registration Rights.  Except as provided in the
                        ------------------- 
         Registration Rights Agreement, the Company has not granted or agreed to
         grant any registration rights, including piggyback rights, to any
         person or entity.

                  2.15. Title to Property and Assets. The Company has good and
                        ----------------------------
         marketable title to all of its properties and assets free and clear of
         all mortgages, liens and encumbrances, except liens for current taxes
         and assessments not yet due and possible minor liens and encumbrances
         that do not, in any case, in the aggregate, materially detract from the
         value of the property subject thereto or materially impair the
         operations of the Company. With respect to the properties and assets it
         leases, the Company is in compliance with such leases and holds a valid
         leasehold interest free of all liens, claims or encumbrances, and to
         the best knowledge of the Company, all other parties to the leases are
         in compliance with all material terms of such leases. The Company's
         properties and assets are in good condition and repair in all material
         respects.

                  2.16. Brokers or Finders. The Company has not agreed to incur,
                        ------------------
         directly or indirectly, any liability for brokerage or finders' fees,
         agents' commissions or other similar charges in connection with this
         Agreement or any of the transactions contemplated hereby.

                  2.17. Financial Statements. The Company has delivered to the
                        --------------------
         Investor its unaudited balance sheet as of September 30, 1998, its
         unaudited statement of operations, stockholders' equity and cash flows
         for the calendar period from January 1, 1998 through such date (the
         Financial Statements"). The Financial Statements fairly and accurately
         present the Company's financial position as of those dates and the
         results of operations and changes in its financial position for such
         periods then ended, and have been prepared in accordance with generally
         accepted accounting principles ("GAAP") applied on a consistent basis,
         subject to normal year-end adjustments, except that unaudited Financial
         Statements may not contain all footnotes required by GAAP. There are no
         debts, liabilities or claims against the Company that are not currently
         reflected in the Financial Statements, contingent or otherwise, that
         are or would be of a nature required to be reflected in a



                                        6
<PAGE>
 
         balance sheet prepared in accordance with GAAP. The Company has no
         material liabilities other than those set forth in the Financial
         Statements and Schedule of Exceptions. The Company is not a guarantor
         or indemnitor of any indebtedness of any other person, firm or
         corporation.

                  2.18. Absence of Changes. Except as specifically set forth in
                        ------------------
         this Agreement, since September 30, 1998: (a) the Company has not
         entered into any transaction that was not in the ordinary course of
         business; (b) there has been no material adverse change in the
         condition (financial or otherwise) of the business, prospects,
         property, assets or liabilities of the Company; (c) there has been no
         damage to, destruction of or loss of physical property (whether or not
         covered by insurance) materially and adversely affecting the assets,
         financial condition, operating results, prospects, business or
         operations of the Company; (d) the Company has not declared or paid any
         dividend or made any distribution on its stock, or redeemed or
         purchased or otherwise acquired any of its stock or incurred any
         material tax liability; (e) the Company has not changed any
         compensation arrangement or agreement with any of its key employees or
         executive officers, or changed the rate of pay of its employees as a
         group; (f) the Company has not received notice that there has been a
         loss of a material customer of the Company; (g) the Company has not
         changed or amended any contract by which the Company or any of its
         assets are bound or subject that would have a material adverse effect
         on the Company; (h) there has been no resignation or termination of
         employment of any officer or key employee of the Company, and the
         Company does not know of any impending resignation or termination of
         employment of any such officer or key employee that if consummated
         would have a material adverse effect on the Company; (i) there has been
         no labor dispute involving the Company or any of its employees and, to
         the knowledge of the Company, none is pending or threatened, (j) there
         has been no material and adverse change in the contingent obligation of
         the Company (nor in any material contingent obligation of the Company
         regarding any director, stockholder or key employee or officer of the
         Company) by way of guaranty, endorsement, indemnity, warranty or
         otherwise; (k) there have been no loans or guarantees made by the
         Company to any of its employees, officers or directors other than
         travel advances and other advances made in the ordinary course of
         business; (1) there has been no waiver by the Company of a valuable
         right or of a debt owing to the Company that would have a material
         adverse effect on the Company; (m) there has not been any satisfaction
         or discharge of any material lien, claim or encumbrance or any payment
         of any material obligation by the Company except in the ordinary course
         of business and that is not material to the assets, properties,
         financial condition, operating results or business of the Company; (n)
         the Company has not sold or transferred any patent, service mark, trade
         name, copyright, trade secret or proprietary right necessary for its
         business; and (o) there has been no other event or condition of any
         character that would have a material adverse effect on the Company.

                  2.19. Related-Party Transactions. No employee, officer or
                        --------------------------
         director of the Company or member of his or her immediate family is
         indebted to the Company, nor is the Company indebted (or committed to
         make loans or extend or guarantee credit) to any of them. To the best
         of the Company's knowledge, none of such persons has any direct or
         indirect ownership interest in any firm or corporation with which the
         Company is affiliated or with which the Company has a business
         relationship, or any firm or corporation that competes with the
         Company, except that employees, officers or directors of the Company
         and members of their immediate families may own stock in publicly
         traded companies that may compete with the Company. No member of the
         immediate family of any officer or director of the Company is directly
         or indirectly interested in any material contract with the Company.


                                        7
<PAGE>
 
                 2.20. Environmental and Safety Laws.  The Company, to the best
                       -----------------------------
         of its knowledge, is not in violation of any applicable statute, law or
         regulation relating to the environment or occupational health and
         safety, and, based on the Company's business as currently conducted and
         no the best of its knowledge, no material expenditures are or will be
         required in order to comply with any such existing statute, law or
         regulation.

                 2.21. Manufacturing and Marketing Rights. The Company has not
                       ---------------------------------- 
         granted rights to manufacture, produce, assemble, license, market or
         sell its products to any other person and is not bound by any agreement
         that affects the Company's exclusive right no develop, manufacture,
         assemble, distribute, market or sell its products.

                 2.22. Disclosure. The Company has fully provided the Investor
                       ----------
         with all the information that the Investor has requested for deciding
         whether to purchase the Shares. No representation or warranty by the
         Company in this Agreement or any statement or certificate furnished to
         the Investor pursuant hereto or in connection with the transactions
         contemplated hereby contains or will contain any untrue statement of a
         material fact or omits or will omit to state a material fact necessary
         to make the statements made therein, in the light of the circumstances
         under which they were made, not misleading.

                 2.23. Insurance.  The Company has in full force and effect fire
                       ---------
         and casualty insurance policies, with extended coverage, sufficient in
         amount (subject to reasonable deductibles) to allow it to replace any
         of its properties that might be damaged or destroyed. The Company has
         in full force and effect products liability insurance in amounts
         customary for companies similarly situated. To the best of the
         Company's knowledge, there is no pending or threatened claim against
         the Company for personal injury or property damage that would have a
         material adverse effect on the business, assets, liabilities, financial
         condition, operations or prospects of the Company.

                 2.24. Tax Returns. All federal, state and local tax returns, if
                       -----------
         any, required to be filed by the Company have been timely filed, and
         all federal, state and local taxes, if any, required to be paid with
         respect to the periods covered by such returns have been paid.

         3.      Representations and Warranties of the Investor.  The Investor
                 ----------------------------------------------     
hereby represents and warrants to the Company with the respect to the
transactions contemplated hereby that:

                 3.1. Investment. The Investor has been provided with copies of
                      ----------
         the Company's Annual Report on Form 10-K for the year ended December
         31, 1997, and its Quarterly Reports on Form 10-Q for the quarters ended
         March 31, 1998, June 30, 1998 and September 30, 1998 and as of the
         Initial Closing has been given the financial and other information
         requested by the Investor or deemed by the Investor to be material for
         it to make an analysis and decision concerning the investment in the
         Shares contemplated by this Agreement. The Investor has been provided
         with an opportunity for a reasonable period of time prior to the
         Initial Closing to ask questions of, and receive answers from, the
         Company and its representatives concerning the Company and the
         investment in the Shares. The Investor has not been furnished with any
         oral information in connection with the offering of the Shares. The
         Investor is acquiring the Shares for investment for its own account and
         not with the view to, or for resale in connection with, any
         distribution thereof. The Investor understands that the Shares have not
         been registered under the Securities Act by reason of a specific
         exemption from the registration provisions of the Securities Act that
         depends upon, among other things, the bona fide nature of the
         investment intent as expressed herein. The Investor further represents
         that it does not have any contract, undertaking, agreement or



                                        8
<PAGE>
 
         arrangement with any person to sell, transfer or grant participation to
         any third person with respect to any of the Shares. The Investor
         understands and acknowledges that the offering of the Shares pursuant
         to this Agreement will not be registered under the Securities Act

                 3.2 Rule 144. The Investor acknowledges than the Shares must be
                     --------
         held indefinitely unless subsequently registered under the Securities
         Act or an exemption from such registration is available. The Investor
         is aware of the provisions of Rule 144 promulgated under the Securities
         Act that permit limited resale of shares purchased in a private
         placement subject to the satisfaction of certain conditions. The
         Investor covenants that, in the absence of an effective registration
         statement covering the shock in question, it will sell, transfer or
         otherwise dispose of the Shares only in a manner consistent with its
         representations and covenants set forth in this Section 3. In
         connection therewith, the Investor acknowledges than the Company will
         make a notation on its stock books regarding the restrictions on
         transfers set forth in this Section 3 and will transfer securities on
         the books of the Company only to the extent not inconsistent therewith.

                 3.3. Authorization.  This Agreement, when executed and
                      -------------
         delivered by the Investor, will constitute a valid and legally binding
         obligation of the Investor, enforceable in accordance with its terms
         subject to: (1) judicial principles respecting election of remedies or
         limiting the availability, of specific performance, injunctive relief,
         and other equitable remedies; (ii) bankruptcy, insolvency,
         reorganization, moratorium or other similar laws now or hereafter in
         effect generally relating to or affecting creditors' rights; and (iii)
         limitations on the enforceability of the indemnification provisions of
         the Registration Rights Agreement.

         4.      Conditions of the Investor's Obligations at Closings. On or
                 ----------------------------------------------------
before the Initial Closing and/or each of the Subsequent Closings, as specified,
the obligations of the Investor under this Agreement are subject to the
fulfillment on or before such Closing of each of the following conditions:

                 4.1. Representations and Warranties. The representations and
                      ------------------------------
         warranties of the Company contained in Section 2 shall be true on and
         as of each Closing with the same effect as though such representations
         and warranties bad been made on and as of the date thereof.

                 4.2. Performance. The Company shall have performed and complied
                      -----------
         with all agreements, obligations and conditions contained in this
         Agreement than are required to be performed or complied with by in on
         or before each Closing.

                 4.3. Consents, Permits and Waivers. On or before each Closing,
                      -----------------------------
         the Company shall have obtained any and all consents, permits and
         waivers necessary or appropriate for consummation of the transactions
         contemplated by this Agreement and the Affiliated Agreements (except
         for such as may be properly obtained subsequent to such Closing).

                 4.4. Compliance Certificate. The Chief Executive Officer of
                      ----------------------
         the Company shall deliver to the Investor at each Closing a certificate
         stating that the conditions specified in Sections 4.1, 4.2 and 4.3 have
         been fulfilled.

                 4.5. Blue Sky. On or before the Initial Closing, the Company
                      --------
         shall have filed the documents required of Company to maintain
         requisite blue sky clearance in (A) all jurisdictions in which any of
         the Shares is originally sold and (B) all other states specified in
         writing by Investor, provided as to clause (B), however, that Company
         shall not be required to qualify to do business


                                        9
<PAGE>
 
         or consent to service of process in any state in which it is not now so
         qualified or has not so consented.

                 4.6. Registration Rights Agreement. The Company and the
                      -----------------------------
         Investor shall have entered into the Registration Rights Agreement in
         substantially the form attached hereto as Exhibit F.
                                                   ---------

                 4.7. Option Agreement. The Company and the Investor shall have
                      ----------------
         entered into the Option Agreement.

                 4.8. Opinion of Company Counsel. The Investor shall have
                      --------------------------
         received from Morgan, Lewis & Bockius LLP, outside counsel to the
         Company, an opinion, dated as of such Closing, in the form attached
         hereto as Exhibit G.
                   ---------

                 4.9. Proceedings and Documents. All corporate and other
                      -------------------------
proceedings in connection with the transactions contemplated in connection with
the Investor's purchase of the Shares and all documents incident thereto shall
be reasonably satisfactory in form and substance to the Investor and the
Investor's counsel, and they shall have received all such counterpart original
and certified or other copies of such documents as they may reasonably request.

                 4.10. Delivery of Stock Certificate. The Company shall have
                       -----------------------------
         caused the delivery to the Investor of a stock certificate representing
         the Investor's ownership of the Shares.

         5.      Conditions of the Company's Obligations at Closing. On or
                 --------------------------------------------------
before the Initial Closing or each of the Subsequent Closings, as specified, the
obligations of the Company to the Investor under this Agreement are subject to
the fulfillment on or before such Closing of each of the following conditions:

                 5.1. Representations and Warranties. The representations and
                      ------------------------------ 
         warranties of the Company contained in Section 2 shall be true on and
         as of each Closing with the same effect as though such representations
         and warranties had been made on and as of the date thereof. The
         representations and warranties of the Investor contained in Section 3
         shall be true on and as of each Closing with the same effect as though
         such representations and warranties had been made on and as of the date
         thereof.

                 5.2. Payment of Purchase Price. The Investor shall have
                      -------------------------
         delivered the purchase price specified in Exhibit A against delivery of
                                                   ---------
         the Shares by the Company to such Investor.

                 5.3. Blue Sky. On or before the Initial Closing, the Company
                      --------
         shall have filed the documents required of Company to maintain
         requisite blue sky clearance in (A) all jurisdictions in which any of
         the Shares is originally sold and (B) all other states specified in
         writing by Investor, provided as to clause (B), however, that Company
         shall not be required to qualify to do business or consent to service
         of process in any state in which it is not now so qualified or has not
         so consented.

                 5.4. Registration Rights Agreement. The Company and the
                      -----------------------------
         Investor shall have entered into the Registration Rights Agreement in
         substantially the form attached hereto as Exhibit F.
                                                   ---------

                 5.5. Option Agreement. The Company and the Investor shall have
                      ----------------
         entered into the Option Agreement.



                                       10
<PAGE>
 
 6.      Post-Closing Covenants
         ----------------------

         6.1. Securities Laws Compliance. The Company shall make any filings
              --------------------------
required by the federal securities laws or the securities or Blue Sky laws of
any applicable state.

 7.      Miscellaneous
         -------------

         7.1. Governing Law. This Agreement shall be governed in all respects by
              -------------
the laws of the State of New York, as applied to agreements among New York
residents entered into and to be performed entirely within New York, without
regard to the choice of law provisions thereof.

         7.2. Successors and Assigns. Except as otherwise provided herein, the
              ----------------------
provisions hereof shall inure to the benefit of, and be binding upon, the
successors, assigns, heirs, executors and administrators of the parties hereto.

         7.3. Entire Agreement Amendment. This Agreement, the other documents
              --------------------------
delivered pursuant hereto, the Registration Rights Agreement and the Option
Agreement constitute the full and entire understanding and agreement among the
parties with regard to the subjects hereof and thereof. Neither this Agreement
nor any term hereof may be amended, waived, discharged or terminated other than
by a written instrument signed by the party against whom enforcement of any such
amendment, waiver, discharge or termination is sought.

         7.4. Notices, Etc. All notices and other communications required or
              ------------   
permitted hereunder shall be in writing and shall be mailed by registered or
certified mail, postage prepaid, return receipt requested, or by telecopier or
otherwise delivered by hand or by messenger, addressed or telecopied as follows:
(i) if to the Investor, at the Investor's address or telecopier number set forth
on the first page hereof, or to telecopier number (650) 952-9881, or at such
other address or telecopier number as the Investor shall have furnished to the
Company in writing, in each case to the attention of the Corporate Secretary;
(ii) if to any other holder of any Shares, at such address or telecopier number
as such holder shall have furnished the Company in writing or, until any such
holder so furnishes an address or telecopier number to the Company, then to and
at the address or telecopier number of the last holder of such Shares who has so
furnished an address to the Company; or (iii) if to the Company, at its address
set forth on the first page of this Agreement, or to telecopier number 
(610) 941-5399, or at such other address or telecopier number as the Company
shall have furnished to the Investor, in each case to the attention of the
Corporate Secretary. If notice is provided by mail, notice shall be deemed to he
given upon proper deposit with the United States mail or nationally recognized
overnight courier, or personally delivered, to an Investor at the address
provided above. If notice is provided by telecopier, notice shall be deemed to
be given upon confirmation by the telecopier machine of the receipt of such
notice at the telecopier number provided above

         7.5. Delays or Omissions. No delay or omission to exercise any right,
              -------------------
power or remedy accruing to the Investor or to the Company upon any breach or
default under this Agreement shall impair any such right, power or remedy, nor
shall it be construed to he a waiver of any such breach or default, or an
acquiescence therein, or of or in any similar breach or default thereafter
occurring; nor shall any waiver of any single breach or default be deemed a
waiver of any other breach or default theretofore or thereafter occurring. Any
waiver, permit, consent or approval of any kind or character on the part of the
Investor or the Company of any breach or default under this Agreement, or any
waiver on the part of the Investor or the Company of any



                                      11
<PAGE>
 
provisions or conditions of this Agreement, must be in writing and shall be
effective only to the extent specifically set forth in such writing or as
provided in this Agreement. All remedies, either under this Agreement or by law
or otherwise, shall be cumulative and not alternative.

         7.6. Severability of this Agreement. In the event that any provision of
              ------------------------------
this Agreement becomes or is declared by a court of competent jurisdiction to he
illegal, unenforceable or void, this Agreement shall continue in full force and
effect without said provision and the parties agree to replace such provision
with a valid and enforceable provision that will achieve, to the extent
possible, the economic, business and other purposes of such provisions; provided
that no such severability shall be effective against a party if it materially
and adversely changes the economic benefits of this Agreement to such party.

         7.7. Table of Contents, Headings, Etc. The Table of Contents and the
              --------------------------------
headings of the Sections of this Agreement, and the headings on the signature
pages of this Agreement categorizing the signatories hereto, have beep inserted
for convenience of reference only, are not to be considered a part hereof, and
shall in no way modify or restrict any of the terms and provisions hereof

         7.8. Counterparts, Facsimile. This Agreement may be executed in any
              -----------------------
number of counterparts and by facsimile, each of which may be executed by fewer
than all of parties hereto, each of which shall be enforceable against the
parties actually executing such counterparts, and all of which together shall
constitute one instrument.

                                          [signature page follows]






                                      12
<PAGE>
 
         IN WITNESS WHEREOF, the parties have executed this Agreement as of the
date first written above.



MAGAININ PHARMACEUTICALS INC.


BY: /s/ M. Dougherty
  -------------------------------
    Name:  Michael R. Dougherty
    Title: President and Chief Executive Officer


GENENTECH, INC.


BY: /s/ W. D. Young
  -------------------------------
    Name:  William D Young
    Title: Chief Operating Officer







                                      13
<PAGE>
 
                                   EXHIBIT A
                                   ---------
                             SCHEDULE OF CLOSINGS

<TABLE>
<CAPTION>
-------------------------------------------------------------------------------------------------------
      Date                Initial Closing or        Per Share           Shares of        Aggregate
   of Closing              a Subsequent          Purchase Price        Common Stock     Consideration
                             Closing
-------------------------------------------------------------------------------------------------------
<S>                       <C>                    <C>                   <C>             <C>          
December 30, 1998            Initial                 $3.223              620,540       $2,000,000.42
-------------------------------------------------------------------------------------------------------
                            Subsequent
-------------------------------------------------------------------------------------------------------
                            Subsequent     
-------------------------------------------------------------------------------------------------------
                            Subsequent
-------------------------------------------------------------------------------------------------------
</TABLE>

The number of spaces provided for by this chart shall not be construed to
determine such number of Subsequent Closings, if any.






                                      A-1
<PAGE>
 
                                   EXHIBIT B
                                   ---------

                            SCHEDULE OF EXCEPTIONS


        There are no exceptions to the representations and warranties set forth
in Section 2 of the Agreement.






                                      B-1
<PAGE>
 
                                   EXHIBIT C
                                   ---------
                         CERTIFICATE OF INCORPORATION




*    The Certificate of Incorporation has been previously filed as an Exhibit to
     the Annual Report on Form 10-K for the year ended June 30, 1992 filed with
     the Securities and Exchange Commission on September 24, 1992. The
     Certificate of Amendment of Restated Certificate of Incorporation was
     previously filed as an Exhibit to the Annual Report on Form 10-K for the
     year ended December 31, 1996 filed with the Securities and Exchange
     Commission on March 31, 1997.





                                      C-1
<PAGE>
 
                                   EXHIBIT D
                                   --------- 
                                    BYLAWS




*    The By-laws have been previously filed as an Exhibit to Registration
     Statement (No. 33-43579) on Form 5-1 filed with the Securities and Exchange
     Commission on October 24, 1991 .





                                      D-l
<PAGE>
 
                                   EXHIBIT E
                                   --------- 

                               LUDWIG AGREEMENT


***








                                        *   THE CONFIDENTIAL MATERIAL CONTAINED
                                            HEREIN HAS BEEN OMITTED AND HAS BEEN
                                            FILED SEPARATELY WITH THE COMMISSION

                                      E-1
<PAGE>
 
                                   EXHIBIT F
                                   ---------

                     FORM OF REGISTRATION RIGHTS AGREEMENT








                                       F-I
<PAGE>
 
                                                                  EXECUTION COPY
                                                                  --------------

                          MAGAININ PHARMACEUTICALS INC.

                          REGISTRATION RIGHTS AGREEMENT

                                December 30, 1998

         THIS REGISTRATION RIGHTS AGREEMENT (this "Agreement") is made and
entered into as of the date first written above by and between MAGAININ
PHARMACEUTICALS INC., a Delaware corporation having its principal executive
offices at 5110 Campus Drive, Plymouth Meeting, Pennsylvania 19462 (the
"Company") and GENENTECH, INC., a Delaware corporation having its principal
executive offices at 1 DNA Way, South San Francisco, California 94080 (the
"Investor").

                                    RECITALS

         WHEREAS, the Company and the Investor have entered into that certain
Common Stock Purchase Agreement, dated as of the date hereof (the "Stock
Purchase Agreement), and than certain Collaborative Research and Option
Agreement, dated as of the date hereof (the "Option Agreement" and, together
with the Stock Purchase Agreement, the "Affiliated Agreements"); and

         WHEREAS, the full execution and delivery of this Agreement is a
condition to the closing of the purchase and sale of the Common Stock as
contemplated by the Stock Purchase Agreement; and

         WHEREAS, in order to further induce the Investor to enter into, and to
make the investment in the Company contemplated by, the Affiliated Agreements,
the Company agreed to enter into this Agreement substantially in the form
attached to the Stock Purchase Agreement, and

         WHEREAS, the Company and the Investor have agreed to the final terms of
this Agreement as set forth herein,

         Now, THEREFORE, in consideration of the mutual promises and covenants
set forth herein,

         THE PARTIES HERETO AGREE AS FOLLOWS:


1.       RESTRICTIONS ON TRANSFERABILITY OF SECURITIES; REGISTRATION RIGHTS.

         1.1   Certain Definitions  As used in this Agreement, the following
terms shall have the meanings set forth below:

               (a) "Closing" shall mean the Initial Closing or any Subsequent
Closing, as applicable.

               (b) "Commission" shall mean the Securities and Exchange
Commission or any other federal agency at the time administering the Securities
Act.

               (c) "Exchange Act" shall mean the Securities Exchange Act of
1934, as amended, or any similar successor federal statute and the rules and
regulations thereunder, all as the same shall be in effect from time to time

                                        1
<PAGE>
 
                  (d) "Holder" shall mean the Investor and any holder of
Registrable Securities to whom the registration rights conferred by this
Agreement have been transferred in compliance with Section 1.2 hereof.


                  (e) "Initial Closing" shall have the meaning ascribed to it in
the Stock Purchase Agreement.

                  (f) "Other Investors" shall mean persons other than Holders
who, by virtue of agreements with the Company, are entitled to include their
securities in any registrations hereunder.

                  (g) "Registrable Securities" shall mean (i) the Shares, (ii)
any additional shares that may be issued by the Company to the Investor as
contemplated by Section 1.3 of the Stock Purchase Agreement, and (iii) any
Common Stock issued as a dividend or other distribution with respect to or in
exchange for or in replacement of the Shares or such additional shares,
provided, however, that Registrable Securities shall not include any shares of
Common Stock that have previously been registered or than have been sold to the
public either pursuant to a registration statement or Rule 144, that have been
sold in a private transaction in which the transferor's rights under this
Agreement are not assigned, or that are no longer registrable pursuant to
Section 1.11 hereof.

                  (h) The terms "register," "register" and "registration" shall
refer to a registration effected by preparation and filing a registration
statement in compliance with the Securities Act and applicable rules and
regulations thereunder, and the declaration or ordering of the effectiveness of
such registration statement.

                  (i) "Registration Expenses" shall mean all expenses incurred
in effecting any registration pursuant to this Agreement, including, without
limitation, all registration, qualification and filing fees, printing expenses,
escrow fees, all fees and disbursements of counsel for the Company, blue sky
fees and expenses, and expenses of any regular or special audits incident to or
required by any such registration, but shall not include the compensation of
regular employees of the Company, which shall be paid in any event by the
Company, and Selling Expenses.

                  (j) "Restricted Securities" shall mean any Registrable
Securities required to bear the legend set forth in Section 1.2(b) hereof.

                  (k) "Rule 144" shall mean Rule 144 as promulgated by the
Commission under the Securities Act, as such Rule may be amended from time to
time, or any similar successor rule that may be promulgated by the Commission.

                  (l) "Rule 145" shall mean Rule 145 as promulgated by the
Commission under the Securities Act, as such Rule may be amended from time to
time, or any similar successor rule that may be promulgated by the Commission.

                  (m) "Securities Act" shall mean the Securities Act of 1933, as
amended, or any similar successor federal statute and the rules and regulations
thereunder, all as the same shall be in effect from time to time.

                  (n) "Selling Expenses" shall mean all underwriting discounts,
selling commissions and stock transfer taxes applicable to the sale of
Registrable Securities and the cost of any accountants, counsel or other experts
retained in connection with such sale by the Holder or Holders or, with their
prior written consent, on behalf of the Holder or Holders.

                                        2
<PAGE>
 
                  (o) "Shares" shall mean the Company's Common Stock issued and
sold to the Investor pursuant to Section 1.2 of the Stock Purchase Agreement.

                  (p) "Subsequent Closing" shall have the meaning ascribed to it
in the Stock Purchase Agreement.

         1.2      Restrictions on Transfer

                  (a) Each Holder agrees not to make any disposition of all or
any portion of the Registrable Securities unless and until the transferee has
agreed in writing for the benefit of the Company to be bound by this Section
1.2, which is intended to ensure compliance with the provisions of the
Securities Act, provided and to the extent this Section 1.2 is then applicable
under the Securities Act to such disposition, and unless and until:

                           (i)   There is then in effect a registration
          statement under the Securities Act covering such proposed disposition
          and such disposition is made in accordance with such registration
          statement; or

                           (ii)  (A) Such Holder shall have notified the Company
          of the proposed disposition and shall have furnished the Company with
          a statement of the circumstances surrounding the proposed disposition,
          and (B) if reasonably requested by the Company, such Holder shall have
          furnished the Company with (l) an opinion of counsel, reasonably
          satisfactory to the Company, that such disposition will not require
          registration of such shares under the Securities Act, (2) a "no
          action" letter from the Commission to the effect that the transfer of
          such securities without registration will not result in a
          recommendation by the staff of the Commission that action be taken
          with respect thereto; or (3) any other evidence reasonably
          satisfactory to counsel to the Company. It is agreed that the Company
          will not require opinions of counsel, "no action" letters or any other
          such evidence; in any transaction in which a Holder that is a
          corporation distributes Restricted Securities after six months after
          the purchase thereof solely to its majority owned subsidiaries or
          affiliates for no consideration; or in any transaction in which a
          Holder that is a partnership distributes Restricted Securities after
          six months after the purchase thereof solely to partners thereof for
          no consideration; provided, however, that each transferee agrees in
          writing to be subject to the terms of this Section 1.2.

                           (iii) Notwithstanding the provisions of paragraphs
          (i) and (ii) above, no such registration statement or opinion of
          counsel shall be necessary for a transfer by a Holder that is (A) a
          partnership to its partners or retired partners in accordance with
          partnership interests, (B) a corporation to its shareholders in
          accordance with their interest in the corporation, (C) a limited
          liability company to its members or former members in accordance with
          their interest in the limited liability company, or (D) to the
          Holder's family member or trust for the benefit of an individual
          Holder, provided the transferee will be subject to the terms of this
          Section 1.2 to the same extent as if such transferee were an original
          Holder hereunder.

                  (b) Each certificate representing Registrable Securities shall
(unless otherwise permitted by the provisions of this Agreement) be stamped or
otherwise imprinted with a legend substantially similar to the following (in
addition to any legend required under applicable state securities laws):

                  "THE SHARES REPRESENTED BY THIS CERTIFICATE HAVE BEEN ACQUIRED
                  FOR INVESTMENT AND HAVE NOT BEEN REGISTERED UNDER THE
                  SECURITIES ACT OF 1933, AS AMENDED (THE "SECURITIES ACT"), AND
                  MAY NOT BE SOLD, TRANSFERRED, ASSIGNED, PLEDGED OR
                  HYPOTHECATED

                                        3
<PAGE>
 
                  UNLESS AND UNTIL REGISTERED UNDER THE SECURITIES ACT OR AN
                  OPINION OF COUNSEL IN FORM AND SUBSTANCE SATISFACTORY TO
                  MAGAININ PHARMACEUTICALS INC. (THE "COMPANY") THAT SUCH
                  REGISTRATION IS NOT REQUIRED."

                  "SUCH SHARES ARE SUBJECT TO RESTRICTIONS ON SALE, ASSIGNMENT
                  OR TRANSFER PURSUANT TO THE TERMS OF A REGISTRATION RIGHTS
                  AGREEMENT BETWEEN THE COMPANY AND THE STOCKHOLDER, A COPY OF
                  WHICH IS ON FILE WITH THE SECRETARY OF THE COMPANY, AND MAY
                  NOT BE SOLD, TRANSFERRED, ASSIGNED, PLEDGED OR HYPOTHECATED
                  OTHER THAN IN COMPLIANCE WITH SUCH REGISTRATION RIGHTS
                  AGREEMENT."

                  (c) The Company shall promptly reissue unlegended certificates
at the request of any Holder thereof if the Holder shall have obtained an
opinion of counsel at such Holder's expense (which counsel may be counsel to the
Company) reasonably acceptable to the Company to the effect that the securities
represented thereby may lawfully be disposed of without registration,
qualification or legend.

                  (d) Any legend endorsed on an instrument pursuant to
applicable federal or state securities laws, and the stop-transfer instructions
with respect to such securities, shall be removed promptly upon the request of
any Holder thereof if the Holder shall have obtained an opinion of counsel at
such Holder's expense (which counsel may be counsel to the Company) reasonably
acceptable to the Company to the effect that such legend is, or instructions
are, no longer required.

          1.3     Shelf Registration.

                  (a) Registration Statement. The Company shall, as soon as
                      ----------------------
practicable, prepare and file with the Commission a Registration Statement on
Form S-3 (the "Registration Statement") to effect the registration under the
Securities Act of the Shares sold pursuant to the Stock Purchase Agreement in
connection with the disposition of all of the Shares by the Holders, from time
to time in the open market, in one or more transactions (which may involve block
transactions), in negotiated, underwritten, or other transactions or through a
combination of such methods of sale, at market prices prevailing at the time of
such sale, at prices relating to such prevailing market prices or at negotiated
prices, and shall use its best efforts to cause the Registration Statement to
become effective as soon as practicable thereafter, provided, however, that in
no event shall the Company be required in connection with this covenant to file
its Annual Report on Form 10-K prior to March 1, 1999. If such disposition is
pursuant to an underwritten offering, Company shall enter into an underwriting
agreement in form reasonably necessary to effect the offer and sale of Common
Stock in connection with any underwritten offering pursuant to this Section 1.3,
provided such underwriting agreement contains customary underwriting provisions.

                  (b) Additional Shares. The Company shall promptly prepare and
                      -----------------
file with the Commission one or more amendments to the Registration Statement
and the prospectus used in connection therewith to register for resale all of
the Registrable Securities.

                  (c) Amendments and Supplements. The Company shall promptly
                      --------------------------
prepare and file with the Commission such amendments and supplements to the
Registration Statement and the prospectus used in connection therewith as may be
necessary to keep the Registration Statement effective until all of the
Registrable Securities have been sold pursuant thereto or until the earlier of
(i) such time as all such Registrable Securities have been disposed of in
accordance with the intended methods of disposition by the Holders set forth in
such Registration Statement, and (ii) such date on which each Holder may dispose

                                        4
<PAGE>
 
of all of the Registrable Securities held by it in one transaction in the open
market pursuant to Rule 144(k) under the Securities Act.

                  (d) Documents. The Company shall promptly furnish to each
                      ---------
Holder with respect to the Registrable Securities registered under the
Registration Statement such number of copies of prospectuses and preliminary
prospectuses in conformity with the requirements of the Securities Act and such
other documents as the Holder may reasonably request, in order to facilitate the
public sale or other disposition of all or any of the Registrable Securities by
the Holder.

                  (e) Blue Sky. The Company shall promptly file documents
                      --------
required of the Company for normal blue sky clearance for the disposition by the
Holders of the Registrable Securities and in each state of the United States,
provided, however, that the Company shall not be required to qualify to do
business or consent to service of process in any jurisdiction in which it is not
not so qualified or has not so consented.

                  (f) Stop Orders. The Company shall promptly inform the Holders
                      -----------
when any stop order has been issued with respect to the Registration Statement
and use its best efforts to promptly cause such stop order to be withdrawn, and
in any event shall, within 45 days of the issuance of such stop order, amend the
Registration Statement in a manner reasonably expected to obtain the withdrawal
of the stop order or file an additional Registration Statement covering all of
the Registrable Securities and use its best efforts to cause such Registration
Statement to become effective as soon as practicable thereafter. In the event
that the Company files such subsequent Registration Statement pursuant hereto,
all of the provisions of this Section 1 shall apply with respect to such
Registration Statement.

                  (g) Expenses. The Company shall bear all Registration Expenses
                      --------
and the Holders shall bear all Selling Expenses.

                  (h) Notification. The Company shall notify each seller of
                      ------------
Registrable Securities covered by such registration statement at any time when a
prospectus relating thereto is required to be delivered under the Securities Act
of the happening of any event as a result of which the prospectus included in
such registration statement, as then in effect, includes an untrue statement of
a material fact or omits to state a material fact required to be stated therein
or necessary to make the statements therein not misleading in the light of the
circumstances then existing, and at the request of any such seller, prepare and
furnish to such seller a reasonable number of copies of a supplement to or an
amendment of such prospectus as may be necessary so that, as thereafter
delivered to the purchasers of such shares, such prospectus shall not include an
untrue statement of a material fact or omit to state a material fact required to
be stated therein or necessary to make the statements therein not misleading or
incomplete in the light of the circumstances then existing.

                  (i) Listing. The Company shall cause all such Registrable
                      -------
Securities registered pursuant to this Agreement to be listed on each securities
exchange on which similar securities issued by the Company are then listed.

                  (j) CUSIP Number. The Company shall provide a transfer agent
                      ------------
and registrar for all Registrable Securities registered pursuant to such
registration statement and a CUSIP number for all such Registrable Securities,
in each case not later than the effective date of such registration.

                  (k) Applicable Rules and Regulations. The Company shall
                      --------------------------------
otherwise use its best efforts to comply with all applicable rules and
regulations of the Commission.

                                        5
<PAGE>
 
         1.4      Indemnification.

                  (a) The Company shall indemnity each Holder, each of its
directors, officers, partners, legal counsel and accountants, and each person
controlling such Holder within the meaning of Section 15 of the Securities Act,
with respect to which registration, qualification or compliance has been
effected pursuant to this Section 1, and each underwriter, if any, and each
person who controls any underwriter within the meaning of Section 15 of the
Securities Act, against all expenses, claims, losses, damages and liabilities
(or actions, proceedings or settlements of litigation, commenced or threatened,
in respect thereof) arising out of or based on any untrue statement (or alleged
untrue statement) of a material fact contained in any prospectus, offering
circular or other document (including any related registration statement,
notification or the like) incident to any such registration, qualification or
compliance, or based on any omission (or alleged omission) to state therein a
material fact required to be stated therein or necessary to make the statements
therein, in light of the circumstances in which they were made, not misleading,
or any violation by the Company of the Securities Act or any rule or regulation
thereunder applicable to the Company and relating to action or inaction required
of the Company in connection with any such registration, qualification or
compliance, and will reimburse each such Holder, each of its officers,
directors, partners, legal counsel and accountants, and each person controlling
such Holder, each such underwriter, and each person who controls any such
underwriter, for any legal and any other expenses reasonably incurred in
connection with investigating, preparing and defending or settling any such
claim, loss, damage or liability (or action or proceeding in respect thereof),
provided that the Company will not be liable in any such case to the extent that
any such claim, loss, damage, liability or expense arises out of or is based on
any untrue statement or omission based upon written information furnished to the
Company by such Holder or underwriter and stated to be specifically for use
therein. It is agreed that the indemnity agreement contained in this Section
1.4(a) shall not apply to amounts paid in settlement of any such claim, loss,
damage or liability (or action or proceeding in respect thereof) if such
settlement is effected without the consent of the Company (which consent has not
been unreasonably withheld).

                  (b) Each Holder shall, if Registrable Securities held by such
Holder are included in the securities as to which such registration,
qualification or compliance is being effected, indemnify the Company, each of
its directors, officers, partners, legal counsel and accountants, and each
underwriter, if any, of the Company's securities covered by such a registration
statement, each person who controls the Company or such underwriter within the
meaning of Section 15 of the Securities Act, each other such Holder, and each
such Holder's directors, officers and partners, and each person controlling such
Holder, against all expenses, claims, losses, damages and liabilities (or
actions, proceedings or settlements of litigation, commenced or threatened, in
respect thereof) arising out of or based on any untrue statement (or alleged
untrue statement) of a material fact contained in any such registration
statement, prospectus, offering circular or other document, or any omission (or
alleged omission) to state therein a material fact required to be stated therein
or necessary to make the statements therein, in light of the circumstances in
which they were made, not misleading, and will reimburse the Company and such
Holders, directors, officers, partners, legal counsel and accountants,
underwriters or control persons for any legal or any other expenses reasonably
incurred in connection with investigating, preparing and defending or settling
any such claim, loss, damage or liability (or action or proceeding in respect
thereof), in each case to the extent, but only to the extent, that such untrue
statement (or alleged untrue statement) or omission (or alleged omission) is
made in such registration statement, prospectus, offering circular or other
document in reliance upon and in conformity with written information furnished
to the Company by such Holder and stated to be specifically for use therein;
provided, however, that the obligations of such Holder hereunder shall not apply
to amounts paid in settlement of any such expenses, claims, losses, damages or
liabilities (or actions or proceedings in respect thereof) if such settlement is
effected without the consent of such Holder (which consent shall not be
unreasonably withheld); and provided further that in no event

                                        6
<PAGE>
 
shall any indemnity under this Section 1.4(b) exceed the gross proceeds from the
offering received by such Holder.

                  (c) Each party entitled to indemnification under this Section
1.4 (the "Indemnified Party") shall give notice to the party required to provide
indemnification (the "Indemnifying Party") promptly after such Indemnified Party
has actual knowledge of any claim as to which indemnity may be sought, and shall
permit the Indemnifying Party to assume the defense of such claim or any
litigation resulting therefrom, provided, however, that counsel for the
Indemnifying Party, who shall conduct the defense of such claim or any
litigation resulting therefrom, shall be approved by the Indemnified Party
(whose approval shall not unreasonably be withheld), and the Indemnified Party
may participate in such defense at such party's expense, and provided further
that an Indemnified Party (together with all other Indemnified Parties that may
be represented without conflict by one counsel) shall have the right to retain
one separate counsel, with the fees and expenses to be paid by the Indemnifying
Party, if representation of such Indemnified Party by the counsel retained by
the Indemnifying Party would be inappropriate due to actual or potential
differing interests between such Indemnified Party and any other party
represented by such counsel in such proceeding, and provided further that the
failure of any Indemnified Party to give notice as provided herein shall not
relieve the Indemnifying Party of its obligations under this Section 1.4, to the
extent such failure is not materially prejudicial to an Indemnifying Party's
ability to defend such action. No Indemnifying Party, in the defense of any such
claim or litigation, shall, except with the consent of each Indemnified Party,
consent to entry of any judgment or enter into any settlement that does not
include as an unconditional term thereof the giving by the claimant or plaintiff
to such Indemnified Party of a release from all liability in respect to such
claim or litigation. Each Indemnified Party shall furnish such information
regarding itself or the claim in question as an Indemnifying Party may
reasonably request in writing and as shall be reasonably required in connection
with defense of such claim and litigation resulting therefrom.

                  (d) If the indemnification provided for in this Section 1.4 is
held by a court of competent jurisdiction to be unavailable to an Indemnified
Party with respect to any expense, claim, loss, damage or liability referred to
herein, then the Indemnifying Party, in lieu of indemnifying such Indemnified
Party hereunder, shall contribute to the amount paid or payable by such
Indemnified Party as a result of such expense, claim, loss, damage or liability
in such proportion as is appropriate to reflect the relative fault of the
Indemnifying Party on the one hand and of the Indemnified Party on the other in
connection with the statements or omissions that resulted in such expense,
claim, loss, damage or liability as well as any other relevant equitable
considerations. The relative fault of the Indemnifying Party and of the
Indemnified Party shall be determined by reference to, among other things,
whether the untrue or alleged untrue statement of a material fact or the
omission or alleged omission to state a material fact that resulted in such
expense, claim, loss, damage or liability relates to information supplied by the
Indemnifying Party or by the Indemnified Party and the parties' relative intent,
knowledge, access to information and opportunity to correct or prevent such
statement or omission; provided that in no event shall any indemnity
contribution by a Holder under this Section 1.4(d) exceed the gross proceeds
from the offering received by such Holder.

                  (e) The obligations of the Company and Holders under this
Section 1.4 shall survive completion of any offering of Registrable Securities
in a registration statement and the termination of this Agreement. No
Indemnifying Party, in the defense of any action or proceeding with respect to
any such claim, loss, damage or liability, shall, except with the consent of
each Indemnified Party, consent to entry of any judgment or enter into any
settlement that does not include as an unconditional term thereof the giving by
the claimant or plaintiff to such Indemnified Party of a release from all
liability in respect to such claim or litigation.

                                        7
<PAGE>
 
                  (f) Notwithstanding the foregoing, to the extent that the
provisions on indemnification and contribution contained in the underwriting
agreement entered into in connection with the underwritten public offering are
in conflict with the foregoing provisions, the provisions in the underwriting
agreement shall control; provided, however, that such provisions shall not
materially limit the Company's indemnification obligations provided hereby.

         1.5      Information by Holder. Each Holder of Registrable Securities
shall furnish to the Company such information regarding such Holder and the
distribution proposed by such Holder as the Company may reasonably request in
writing and as shall be reasonably required in connection with any registration,
qualification or compliance referred to in this Section 1.

         1.6      Rule 144 Reporting. With a view to making available the
benefits of certain rules and regulations of the Commission that may permit the
sale of the Restricted Securities to the public without registration, the
Company agrees to use its best efforts to:

                  (a) Make and keep public information regarding the Company
available, as those terms are understood and defined in Rule 144 under the
Securities Act, at all times (the Company being currently subject to the
reporting requirements of the Securities Act and the exchange Act);

                  (b) File with the Commission in a timely manner all reports
and other documents required of the Company under the Securities Act and the
Exchange Act.

                  (c) So long as a Holder owns any Restricted Securities,
furnish to the Holder forthwith upon its request, (i) a written certification by
the Company, signed by its Chief Executive Officer, that the Company is in
compliance with the reporting requirements of Rule 144, and of the Securities
Act and the Exchange Act, (ii) a copy of the most recent annual or quarterly
report of the Company, and (iii) such other reports and documents so filed as a
Holder may reasonably request in availing itself of any rule or regulation of
the Commission allowing a Holder to sell any such securities without
registration.

          1.7     Transfer or Assignment of Registration Rights. The rights to
cause the Company to register securities granted to a Holder by the Company
under this Section 1 may be transferred or assigned by a Holder only to a
transferee or assignee of Registrable Securities, provided that the Company is
given written notice at the time of or within a reasonable time after said
transfer or assignment, stating the name and address of the transferee or
assignee and identifying the securities with respect to which such registration
rights are being transferred or assigned, and, provided further, that the
transferee or assignee of such rights assumes in writing the obligations of such
Holder under this Section I.

         1.8      Market Stand-Off Agreement. If requested by the Company and an
underwriter of Common Stock (or other securities) of the Company, a Holder shall
not sell or otherwise transfer or dispose of any Common Stock (or other
securities) of the Company held by the Holder (other than those included in the
registration) during such period of time not to exceed ninety (90) days
following the effective date of a registration statement of the Company filed
under the Securities Act, provided that.

                           (i) such agreement shall only apply to the first such
          registration statement of the Company hereafter, including securities
          to be sold on its behalf to the public in an underwritten offering;

                                        8
<PAGE>
 
                  (ii)  all officers and directors of the Company, and holders
         of Common Stock issued by the Company directly to such holders in an
         exempt private transaction, are bound by and have entered into similar
         agreements; and

                  (iii) such agreement shall apply only once in any calendar
         year.

The obligations described in this Section 18 shall not apply to a registration
relating solely to employee benefit plans on Form S-8 or any similar form that
may be promulgated in the future, or a registration relating solely to a
Commission Rule 145 transaction on Form S-4 or any similar form that may be
promulgated in the future. The Company may impose stop-transfer instructions
with respect to the shares of Common Stock (or other securities) subject to the
foregoing restriction until the end of said ninety (90) day period.

         1.9  Delay of Registration. No Holder shall have any right to take any
action to restrain, enjoin or otherwise delay any registration as the result of
any controversy that might arise with respect to the interpretation or
implementation of this Section 1.

         1.10 Termination of Registration Rights. The right of any Holder to
inclusion in any registration pursuant to Section 1.3 shall terminate on such
date as all shares of Registrable Securities held by such Holder may immediately
be sold under Rule 144 during any 90-day period.

 2.      COVENANTS OF THE COMPANY

         The Company hereby covenants and agrees, so long as any Holder owns any
Registrable Security, as follows:

         2.1  Basic Financial Information. If the Company should no longer be
subject to the reporting requirements of the Exchange Act, the Company shall
furnish the following reports to each Holder:

              (a) As soon as practicable after the end of each fiscal year of 
the Company, and in any event within the period thereafter when a filing on Form
10-K would be required, a consolidated balance sheet of the Company and its
subsidiaries, if any, as at the end of such fiscal year, and consolidated
statements of income and cash flows of the Company and its subsidiaries, if any,
for such year, prepared in accordance with generally accepted accounting
principles consistently applied and setting forth in each case in comparative
form the figures for the previous fiscal year, all in reasonable detail and
certified by independent public accountants of recognized national standing
selected by the Company.

              (b) As soon as practicable after the end of each of the first,
second and third quarterly accounting periods in each fiscal year of the
Company, and in any event within the period thereafter when a filing on Form
10-Q would be required, a consolidated balance sheet of the Company and its
subsidiaries, if any, as of the end of each such quarterly period, and
consolidated statements of income and cash flows of the Company and its
subsidiaries, if any, for such period and for the current fiscal year to date,
prepared in accordance with generally accepted accounting principles
consistently applied and setting forth in comparative form the figures for the
corresponding periods of the previous fiscal year, subject to changes resulting
from normal year-end audit adjustments, all in reasonable detail and certified
as to the foregoing by the principal financial or accounting officer of the
Company, except that such financial statements need not contain the notes
required by generally accepted accounting principles.



                                        9
<PAGE>
 
3.       MISCELLANEOUS.

         3.1 Governing Law. This Agreement shall be governed in all respects by
the laws of the State of New York, as applied to agreements among New York
residents entered into and to be performed entirely within New York, without
regard to the choice of law provisions thereof.

         3.2 Successors and Assigns. Except as otherwise expressly provided
herein, the provisions hereof shall inure to the benefit of, and be binding
upon, the successors, assigns, heirs, executors and administrators of the
parties hereto.

         3.3 Entire Agreement. This Agreement, together with each of the
Affiliated Agreements, constitutes the full and entire understanding and
agreement between the parties with regard to the subjects hereof and thereof.

         3.4 Notices, etc. All notices and other communications required or
permitted hereunder shall be in writing and shall be mailed by registered or
certified mail, postage prepaid, return receipt requested, or by telecopier or
otherwise delivered by hand or by messenger, addressed or telecopied as follows;
(i) if to the Investor, at the Investor's address or telecopier number set forth
on the first page hereof, or to telecopier number (650) 952-9881, or at such
other address or telecopier number as the investor shall have furnished to the
Company in writing, in each case to the attention of the Corporate Secretary;
(ii) if to any other holder of any Shares, at such address or telecopier number
as such holder shall have furnished the Company in writing or, until any such
holder so furnishes an address or telecopier number to the Company, then to and
at the address or telecopier number of the last holder of such Shares who has so
furnished an address to the Company; or (iii) if to the Company, at its address
set forth on the first page of this Agreement, or to telecopier number (610)
941-5399, or at such other address or telecopier number as the Company shall
have furnished to the Investor, in each case to the attention of the Corporate
Secretary. If notice is provided by mail, notice shall be deemed to be given
upon proper deposit with the United States mail or nationally recognized
overnight courier, or personally delivered, to an Investor at the address
provided above. If notice is provided by telecopier, notice shall be deemed to
be given upon confirmation by the telecopier machine of the receipt of such
notice at the telecopier number provided above.

          3.5 Delays or Omissions. No delay or omission to exercise any right,
power or remedy accruing to any Holder, upon any breach or default of the
Company under this Agreement shall impair any such right, power or remedy of
such Holder nor shall it be construed to be a waiver of any such breach or
default, or an acquiescence therein, or of or in any similar breach or default
thereafter occurring; nor shall any waiver of any single breach or default be
deemed a waiver of any other breach or default therefore or thereafter
occurring. Any waiver, permit, consent or approval of any kind or character on
the part of any Holder of any breach, or default under this Agreement or any
waiver on the part of any Holder of any provisions or conditions of this
Agreement must be made in writing and shall be effective only to the extent
specifically set forth in such writing. All remedies, either under this
Agreement or by law or otherwise afforded to any Holder, shall be cumulative and
not alternative.

         3.6 Rights. Unless otherwise expressly provided herein, a Holder's
rights hereunder are several rights, not rights jointly held with any of the
other Holders, if any.

         3.7 Severability of this Agreement. In the event that any provision of
this Agreement becomes or is declared by a court of competent jurisdiction to be
illegal, unenforceable or void, this Agreement shall continue in full force and
effect without said provision and the parties agree to replace such provision
with a valid and enforceable provision that will achieve, to the extent
possible, the



                                       10

<PAGE>
 
economic, business and other purposes of such provisions, provided that no such
severability shall be effective against a party if it materially and adversely
changes the economic benefits of this Agreement to such party.

         3.8 Table of Contents, Headings, Etc. The Table of Contents and the
headings of the Sections of this Agreement have been inserted for convenience of
reference only, are not to be considered a part hereof, and shall in no way
modify or restrict any of the terms and provisions hereof.

          3.9 Counterparts; Facsimile. This Agreement may be executed in any
number of counterparts and by facsimile, each of which shall be enforceable
against the party or parties actually executing such counterparts, and all of
which together shall constitute one instrument.

                           [signature page follows]






                                       11
<PAGE>
 
         IN WITNESS WHEREOF, the parties hereto have executed this Registration
Rights Agreement effective as of the date first above written.

MAGAININ PHARMACEUTICALS INC.


BY /s/ Michael R. Dougherty
  ---------------------------
     Name:  Michael R. Dougherty
     Title: President and Chief Executive Officer

GENENTECH, INC


BY 
  ---------------------------
     Name:
     Title:



                                       12
<PAGE>
 
         IN WITNESS WHEREOF, the parties hereto have executed this Registration
Rights Agreement effective as of the date first above written

MAGAININ PHARMACEUTICALS INC


BY:
   ----------------------------------
     Name:
     Title:

GENENTECH, INC

BY: /s/ William D. Young
   ----------------------------------
     Name:   William D. Young
     Title:  Chief Operating Officer
<PAGE>
 
                                   EXHIBIT G
                                   ---------

                      FORM OF OPINION OF COMPANY COUNSEL







                                       G-l
<PAGE>
 
            [LETTERHEAD OF MORGAN, LEWIS & BOCKIUS LLP APPEARS HERE]



December 30, 1998




Genentech, Inc.
One DNA Way
South San Francisco, CA 94080

Re:  Magainin Pharmaceuticals Inc. 
     ----------------------------

Ladies and Gentlemen:

We have acted as counsel to Magainin Pharmaceuticals Inc., a Delaware
corporation (the "Company"), in connection with the issuance by the Company of
an aggregate of 620,540 shares (the "Shares") of the Company's common stock,
$.002 par value per share (the "Common Stock"), pursuant to a Stock Purchase
Agreement (the "Agreement"), dated as of December 30, 1998, between the Company
and Genentech, Inc. (the "Investor"). All capitalized terms used herein without
definition are used herein with the respective meanings ascribed to them in the
Agreement. This opinion is being delivered to you pursuant to Section 4.8 of the
Agreement.

In rendering this opinion, we have participated in the preparation of the
documents contemplated by the offering. We have examined executed counterparts
or copies certified or otherwise identified to our satisfaction of the Agreement
and the Affiliated Agreements. As to various questions of fact material to our
opinion, we have relied, without independent investigation, upon the
representations of the parties thereto set forth in the Agreement and the
Affiliated Agreements, and upon such certificates of officers and
representatives of such parties as we have deemed relevant, as well as
certificates of public officials.

We have also assumed the genuineness of all signatures, the authenticity of all
documents submitted to us as originals and the conformity with originals of all
documents submitted to us as copies. We have also assumed with respect to each
party other than the Company that the Agreement and the Affiliated Agreements
have been duly authorized, executed and delivered by such party and that each
party has full power and authority to execute, deliver and perform the Agreement
and the Affiliated Agreements to which it is a party. 
<PAGE>
 
                        [LETTERHEAD OF MORGAN, LEWIS & BOCKIUS LLP APPEARS HERE]

Genentech, Inc.
December 30, 1998
Page 2



Based on the foregoing and subject to the qualifications and limitations set
forth below, we are of the opinion that:


                  1. The Company has been duly incorporated and is validly
         existing and in good standing under the laws of the State of Delaware,
         with all necessary corporate power and authority to enter into the
         Agreement and the Affiliated Agreements, and to perform its obligations
         thereunder.

                  2. The execution, delivery and performance of the Agreement
         and the Affiliated Agreements have been duly authorized by all
         necessary corporate action of the Company, and the Agreement and the
         Affiliated Agreements have been duly executed and delivered by the
         Company. Each of the Agreement and the Affiliated Agreements
         constitutes a valid and binding obligation of the Company, enforceable
         against the Company in accordance with its terms, subject to applicable
         bankruptcy, insolvency, reorganization and similar laws affecting the
         enforcement of creditors' rights generally, to the effect of rules of
         law governing specific performance, injunctive relief or other
         equitable remedies and to general principles of equity (regardless of
         whether such enforceability is considered in a proceeding in equity or
         an action at law).

                  3. The Shares to be issued and sold on the date hereof by the
         Company pursuant to the Agreement have been duly authorized and, when
         issued to and paid for by you in accordance with the terms of the
         Agreement, will be validly issued, fully paid and non-assessable, free
         of any liens or encumbrances and not subject to preemptive rights
         pursuant to the Certificate of Incorporation or, to our knowledge,
         other similar rights of the stockholders of the Company.

                   4. Assuming the accuracy of the representations of the
         Investor contained in the Agreement and the Affiliated Agreements, and
         assuming that offers and sales of the Shares have been made only in the
         State of California, the offer and sale of the Shares and the delivery
         of the Shares to you pursuant to the terms of the Agreement is exempt
         from the registration requirements of the Securities Act of 1933, as
         amended, and are exempt from the applicable requirements of the
         securities laws of the State of California. We express no opinion as to
         compliance with applicable anti-fraud statutes, rules or regulations of
         any applicable law governing the issuance of securities.

                   5. The execution and delivery of each of the Agreement and
          the Affiliated Agreements and the issuance and sale of the Shares on
          the date hereof by the Company
<PAGE>
 
            [LETTERHEAD OF MORGAN, LEWIS & BOCKIUS LLP APPEARS HERE]

Genentech, Inc.
December 30, 1998
Page 3


         pursuant to the Agreement will not result in the violation by the
         Company of its Certificate of Incorporation or Bylaws or, to our
         knowledge, any federal or state statute, rule or regulation applicable
         to the Company (other than federal or state securities laws, which are
         specifically addressed elsewhere herein), and, to our knowledge, do not
         contravene any order, writ, judgment, injunction, decree, determination
         or award that has been entered against the Company, the violation of
         which would materially and adversely affect the Company, its assets,
         financial condition or operations, and no consent, approval,
         authorization or order of, or filing with, any federal or California
         court or governmental agency or body is required for the consummation
         of the issuance and sale of the Shares on the date hereof by the
         Company pursuant to the Agreement.

                  6. The authorized capital stock of the Company consists of
         45,000,000 shares of Common Stock, par value $.002 per share, and
         9,211,031 shares of Preferred Stock, par value $.0001 per share.

                  7. Except as disclosed in the Agreement and any documents
         referred to therein and relying as to judgments in respect of
         materiality on the advice of the executive officers of the Company, to
         our knowledge, there is no action, proceeding or investigation pending
         or threatened against the Company in any court or before any
         governmental authority or arbitration board or tribunal that, if
         adversely determined, would have a material adverse effect on the
         Company taken as a whole or would question the validity of the
         Agreement or the Affiliated Agreements, the Shares or any action taken
         or to be taken pursuant to the Agreement or the Affiliated Agreements
         or contemplated thereby.

                  The opinions set forth above are subject to the following
         qualifications:

                  (A) Wherever we have stated we have assumed any matter, it is
         intended to indicate that we have assumed such matter without making
         any factual, legal or other inquiry or investigation, and without
         expressing any opinion or conclusion of any kind concerning such
         matter.

                  (B) Whenever a statement or opinion set forth herein is
         qualified by "to our knowledge", or any similar phrase, it is intended
         to indicate that, during the course of our representation of the
         Company in the subject transaction and in prior transactions no
         information that would give us current actual knowledge of the
         inaccuracy of such statement has come to the attention of those
         attorneys in this Firm who have rendered legal services in connection
         with the representation described in the introductory
<PAGE>
 
                         [LETTERHEAD OF MORGAN,LEWIS & BOCKIUS LLP APPEARS HERE]

Genentech, Inc.
December 30, 1998
Page 4


         paragraph of this opinion letter. However, we have not undertaken any
         independent investigation to determine the accuracy of such statement
         or opinion; no inference as to our knowledge of any matters bearing on
         the accuracy of any such statement or opinion should be drawn from the
         fact of our representation of the Company.

                   (C) We express no opinion with respect to the laws of any
         jurisdiction other than the federal laws of the United States of
         America, the laws of the Commonwealth of Pennsylvania and the Delaware
         General Corporation Law (the "DGCL") and, with respect to our opinion
         in paragraph 5, the California Corporate Securities Law of 1968, as
         amended. Further, we express no opinion with respect to any federal or
         state laws relating to tax and antitrust matters. With respect to
         paragraph 5, our opinion regarding state securities laws is based
         solely upon our examination of the latest unofficial compilations
         available to us of the applicable statutes, if any, of the State of
         California, and, in certain instances, the published rules and
         regulations issued thereunder. Our opinion in paragraph 5 with respect
         to state securities laws is further subject to broad discretionary
         powers of the authorities administering the state securities laws to,
         among other things, withdraw exemptions accorded by statute, to impose
         additional requirements or to revoke or suspend at any time the
         registration or qualification of securities for offering in their
         respective jurisdictions. With respect to the State of California, we
         have relied exclusively on information provided in the Agreement by the
         Investor concerning the residency or principal place of business of the
         Investor. Moreover, we have assumed that no form of general
         solicitation or general advertising has been utilized in connection
         with the sale of the Shares. We note that the Agreement and the
         Ancillary Agreements recite that they are governed by the laws of the
         State of New York. We have made no investigation of New York law nor
         consulted with counsel admitted to practice law in the State of New
         York. Instead, with your consent, we have assumed that the laws of the
         State of New York are in all respects identical to the laws of the
         Commonwealth of Pennsylvania.

                   (D) We express no opinion in Paragraph 2 as to the
         enforceability of (i) the Option Agreement or Section 1.3 of the
         Agreement or (ii) any provisions in the Agreement or any Affiliate
         Agreement relating to indemnification, contribution or choice of
         governing law.

                   (E) This opinion speaks only as of the date hereof and we do
         not have, nor do we assume, any obligation to advise you of any changes
         in facts or in the applicable laws of the Commonwealth of Pennsylvania
         or the United States of America or the DGCL which may affect our
         opinion.
<PAGE>
 
                        [LETTERHEAD OF MORGAN, LEWIS & BOCKIUS LLP APPEARS HERE]

Genentech, Inc.
December 30, 1998
Page 5


         This opinion is solely for the benefit of the addressee hereof for use
in connection with the transactions contemplated by the Agreement and may not be
relied upon by any other person or for any other purpose without our express
written consent.


Very truly yours,

/s/ Morgan, Lewis & Bockius LLP