EXHIBIT 10.42

FOURTH AMENDMENT

TO

LOAN AND SECURITY AGREEMENT

THISFOURTH AMENDMENT TO LOAN AND SECURITY AGREEMENT (this Amendment) is entered into as of March 3, 2011
by and between Silicon Valley Bank (Bank) and Enteromedics Inc., a Delaware corporation (Borrower), whose address is 2800 Patton Road, Saint Paul, MN 55113.

RECITALS

A.Borrower, as borrower, and Bank, Compass Horizon Funding Company LLC and Venture Lending & Leasing V, Inc., as lenders, entered into that certain Loan and Security Agreement with an
Effective Date of November 18, 2008, Subsequently, in accordance with that certain First Amendment to Loan and Security Agreement (the First Amendment), dated February 8, 2010, between Borrower and Bank, the
Borrower and Bank agreed to the terms of the Amended SVB/Borrower Loan Agreement (as defined in the First Amendment and herein referred to, as amended to date, as the Loan Agreement).

B.Bank has extended credit to Borrower for the purposes permitted in the Loan Agreement.

C.Borrower has requested that Bank amend the Loan Agreement, as herein set forth, and Bank has agreed to the same, but only to
the extent, in accordance with the terms, subject to the conditions and in reliance upon the representations and warranties set forth herein.

AGREEMENT

NOW,
THEREFORE, in consideration of the foregoing recitals and other good and valuable consideration, the receipt and adequacy of which is hereby acknowledged, and intending to be legally bound, the parties hereto agree as follows:

1. Definitions. Capitalized terms used but not defined in this Amendment shall have the meanings given to them in the
Loan Agreement.

2. Amendments and Other Provisions.

2.1. Acknowledgment, Additional Advance and Repayment of Term Loan. Borrower and Bank acknowledge and agree that the
outstanding principal amount of the Term Loan was $5,959,843.28 as of February 28, 2011 (the Prior Balance) and was $5,768,173.34 as of March 2, 2011 (the Current Balance) following a principal payment. Upon
Borrower and Bank entering into this Amendment, Bank shall lend to Borrower an amount equal to the difference between the Prior Balance and the Current Balance, and the amount so lent shall be added to and become a part of the Term Loan. The portion
of Section 2.1.1(d) of the Loan Agreement that reads as follows:



---

Borrower shall repay the remaining outstanding amount of the Term Loan in 30 consecutive
equal monthly payments, each consisting of the interest required to be paid with respect to such Term Loan pursuant to subsection c above plus a portion of the principal of the Term Loan, in the amount necessary to fully amortize the
Term Loan over such period (such amount to be calculated by Facility Agent), commencing on January 1, 2011 and continuing on the Payment Date of each month thereafter until June 1, 2013 (the Term Loan Maturity
Date)

is hereby amended to read as follows:

Borrower shall repay the remaining outstanding amount of the Term Loan in 30 consecutive equal monthly payments, each consisting of the
interest required to be paid with respect to such Term Loan pursuant to subsection c above plus a portion of the principal of the Term Loan, in the amount necessary to fully amortize the Term Loan over such period (such amount to be
calculated by Facility Agent) (the Payment Amount), commencing on October 1, 2011 and continuing on the Payment Date of each month thereafter until March 1, 2014 (the Term Loan Maturity Date)

2.2. Change in Payment Amount.Section 2.1.1(d) of the Loan Agreement is hereby amended by adding the
following to the end thereof:

If the interest rate applicable to the Term Loan shall ever change pursuant to Section 2.3,
then the Payment Amount shall change so that it shall continue to be the amount necessary to fully amortize the Term Loan over the remaining number of monthly Payment Dates to and including the Term Loan Maturity Date (such changed amount to be
calculated by Facility Agent).

2.3. Permitted Prepayment of Term Loan. The portion of Section 2.1.1(f) of
the Loan Agreement that reads as follows:

(B) a fee equal to the Make-Whole Premium with respect to each Term Loan,

is hereby amended to read as follows:

(B) a fee equal to the Make-Whole Premium with respect to each Term Loan, provided that such Make-Whole Premium with respect to such prepayment shall not be charged if such prepayment is part of a
replacement of the Term Loan with a new facility from another division of SVB,



---

2.4. Interest Rate.Section 2.3(a) of the Loan Agreement reads as follows:

(a) Interest Rate. Subject to Section 2.3(b), the principal amount outstanding under the Term Loan shall accrue
interest at a fixed per annum rate equal to eleven percent (11%), which interest shall be payable monthly in accordance with Section 2.3(f) below.

Effective as of March 1, 2011, said Section 2.3(a) of the Loan Agreement is hereby amended to read as follows:

(a) Interest Rate. Subject to Section 2.3(b), the principal amount outstanding under the Term Loan shall accrue interest at a fixed per annum rate based on Borrowers Liquidity Ratio (and
the existence or non-existence of an Event of Default) as set forth below, which interest shall be payable monthly in accordance with Section 2.3(f) below.



|                                                                                           |  |                          
|------------------------------------------------------------------------------------------ |  | -------------------------
|Liquidity Ratio as of the end of a month
and Event of Default status                       |  | Interest Rate            
|                                                                                           | 
|Greater than or equal to 1.50:1.00, and no Event of Default has occurred and is continuing |  | 6.25% (the Lower Rate) 
|                                                                                           | 
|Less than 1.50:1:00, or an Event of Default has occurred and is continuing                 |  | 9.00% (the Higher Rate)

The initial interest rate in effect as of March 1, 2011 shall be the Lower Rate. Increases or decreases in the interest rate based
on the Borrowers Liquidity Ratio as provided above shall go into effect as of the first day of the month following the month in which Borrowers monthly financial statements and Compliance Certificate are received by Bank. If, based on
the Liquidity Ratio as shown in Borrowers financial statements there is to be an increase in the interest rate, the interest rate increase may be put into effect by Bank as of the first day of the month following the month in which
Borrowers financial statements and Compliance Certificate were due, even if the delivery of the financial statements and Compliance Certificate is delayed. The Higher Rate shall go into effect immediately upon the occurrence and during the
continuance of an Event of Default unless Bank otherwise elects from time to time in its sole discretion to delay its effect or impose a smaller increase. If thereafter such Event of Default (and any other then-existing Event of Default) is waived
in writing, the interest rate that otherwise would be in effect according to the above table shall go into effect as of the first day of the month following the month in which such waiver occurred.



---

2.5. Final Payment. For purposes of clarity, the parties acknowledge and agree that
the amount of the Final Payment for the Bank Term Loan is $500,000.

2.6. Elimination of Springing Lien on Excluded
Collateral.Section 4.3 of the Loan Agreement is hereby amended to read as follows: 4.3 [Reserved].

2.7. Financial Statements, Reports, Certificates.The twenty (20) days set forth in subpart (i) of
Section 6.2(a) of the Loan Agreement is hereby amended to read thirty (30) days. The one hundred twenty (120) days set forth in subpart (ii) of Section 6.2(a) of the Loan Agreement is hereby amended
to read one hundred fifty (150) days. Subpart (iii) of Section 6.2(a) of the Loan Agreement is hereby amended to read (iii) as soon as available, but in any event at least 15 days before the end of each fiscal year
of Borrower, Borrowers operating budget and financial projections for its next fiscal year as approved by Borrowers Board of Directors. The twenty (20) days set forth in Section 6.2(b) of the Loan Agreement is
hereby amended to read thirty (30) days. The twenty (20) days set forth on Schedule 2 of the Loan Agreement is hereby amended to read thirty (30) days.

2.8. Financial Covenants. Section 6.7 of the Loan agreement reads as follows:

Financial Covenants.

Borrower shall maintain at all times, to be tested as of the last day of each month, unless otherwise noted, on a consolidated basis with respect to Borrower and its Subsidiaries:

(a) Liquidity Ratio. A ratio of (i) the sum of Borrowers unrestricted cash and Cash Equivalents held with Silicon
Valley Bank and Silicon Valley Banks Affiliates plus Borrowers Eligible Accounts, divided by (ii) the outstanding principal amount of the Term Loan, of not less than 1.00:1.00.

Said Section 6.7 of the Loan Agreement is amended to read as follows for the month of March 2011 and continuing for the months thereafter:

Financial Covenants.

Borrower shall maintain at all times, to be tested as of the last day of each month, unless otherwise noted, on a consolidated basis with respect to Borrower and its Subsidiaries:

(a) Liquidity Ratio. A ratio (the Liquidity Ratio) of (i) the sum of Borrowers unrestricted cash and
Cash Equivalents held with Silicon Valley Bank and Silicon Valley Banks Affiliates plus Borrowers Eligible Accounts, divided by (ii) the outstanding principal amount of the Term Loan, of not less than 1.00:1.00.



---

(b) EBITDA. If the Liquidity Ratio is less than 1.50:1.00 as of the last day in any
month, EBITDA for the three months ending as of the last day of such month that is (i) not less than 110% of the Projected EBITDA for such period, if the Projected EBITDA for such period were less than zero (for example, if Projected
EBITDA were negative $1,000,000, then actual EBITDA would be required to be not less than negative $1,100,000), or (ii) at least 90% of the Projected EBITDA for such period, if the Projected EBITDA for such period were greater or equal
to zero.

2.9. Elimination of New Capital Transactions Requirement.Section 6.12 of the Loan Agreement is hereby
amended to read as follows: Section 6.12 [Reserved].

2.10. Definition of Make-Whole
Premium. The definition of Make-Whole Premium set forth in Section 13.1 of the Loan Agreement that reads as follows:

Make-Whole Premiumshall mean, with respect to each Term Loan, an amount equal to the following percentage of the aggregate of all interest that would have been due
with respect to such Term Loan had such Term Loan been repaid in all the installments provided for in Section 2.1.1(d), but was not so repaid as a consequence of a mandatory or permitted prepayment (as applicable) of the Term Loan: (a) 80%
if at the time the Make-Whole Premium becomes due under the terms hereof Borrower has made twelve (12) regularly scheduled monthly payments of principal in accordance with Section 2.1.1(d), and (b) 100% if at the time the Make-Whole
Premium becomes due under the terms hereof Borrower has not made twelve (12) regularly scheduled monthly payments of principal in accordance with Section 2.1.1(d).

is hereby amended by replacing it with the following definitions:

Make-Whole Amount shall mean, with respect to each Term Loan, (a) in the case of any prepayment pursuant to
Section 2.1.1(f) hereof, the amount of the Term Loan being prepaid, and (b) in the case of all or any portion of the Term Loan becoming due and payable according to the terms hereof because of the occurrence and continuance of an Event of
Default, such amount of the Term Loan that has become due and payable according to the terms hereof.

Make-Whole Event
Date shall mean, with respect to each Term Loan, (a) in the case of any prepayment pursuant to Section 2.1.1(f) hereof, the date of such prepayment, and (b) in the case of all or any portion of the Term Loan becoming due and
payable according to the terms hereof because of the occurrence and



---

continuance of an Event of Default, the date such amount of the Term Loan has become due and payable according to the terms hereof.

Make-Whole Premium shall mean, with respect to each Term Loan, and with respect to any actual or required prepayment of
all or any portion of the Term Loan, an amount equal to 1% of the Make-Whole Amount if the Make-Whole Event Date occurs on or before the first anniversary of the date of the Fourth Amendment; zero (0) if the Make-Whole Event Date occurs
thereafter.

2.11 Exhibit BCompliance Certificate. Exhibit B to the Loan Agreement (the form of Compliance
Certificate) shall be replaced with Exhibit A hereto in accordance with the transition to the revised Financial Covenants provided for herein.

2.12. Elimination of Cash Security for Term Loan.Sections 2.3 and 2.4 of the Third Amendment (regarding Borrowers obligation to maintain cash collateral with Bank) are hereby deleted and of
no further force or effect.

2.13. Addition of Definitions. The following definitions are hereby added to
Section 13.1 of the Loan Agreement in the appropriate alphabetical order:

Bank shall mean Silicon
Valley Bank (which is also sometimes referred to as SVB).

EBITDA shall mean (a) Net
Income, plus (b) Interest Expense, plus (c) to the extent deducted in the calculation of Net Income, depreciation expense and amortization expense, plus (d) income tax expense.

Fourth Amendment is that certain Fourth Amendment to Loan and Security Agreement dated March 3, 2011, between SVB
and Borrower.

Interest Expense means for any fiscal period, interest expense (whether cash or non-cash)
determined in accordance with GAAP for the relevant period ending on such date, including, in any event, interest expense with respect to any Credit Extension and other Indebtedness of Borrower and its Subsidiaries, including, without limitation or
duplication, all commissions, discounts, or related amortization and other fees and charges with respect to letters of credit and bankers acceptance financing and the net costs associated with interest rate swap, cap, and similar arrangements,
and the interest portion of any deferred payment obligation (including leases of all types).

Liquidity
Ratio is defined in Section 6.7 of the Loan Agreement.



---

Net Income means, as calculated on a consolidated basis for Borrower and
its Subsidiaries for any period as at any date of determination, the net profit (or loss), after provision for taxes, of Borrower and its Subsidiaries for such period taken as a single accounting period.

Payment Amount is defined in Section 2.1.1(d) of the Loan Agreement.

Projected EBITDA means, for any period, the EBITDA that would be achieved for that period if Borrowers financial
results for the period match the financial projections covering such period that are provided to Bank pursuant to Section 6.2(a)(iii) hereof.

3. Limitation of Amendments.

3.1.The amendments set forth above
are effective for the purposes set forth herein and shall be limited precisely as written and shall not be deemed to (a) be a consent to any amendment, waiver or modification of any other term or condition of any Loan Document, or
(b) otherwise prejudice any right or remedy which Bank may now have or may have in the future under or in connection with any Loan Document.

3.2.This Amendment shall be construed in connection with and as part of the Loan Documents and all terms, conditions, representations, warranties, covenants and agreements set forth in the Loan
Documents, except as herein amended, are hereby ratified and confirmed and shall remain in full force and effect.

4.
Representations and Warranties. To induce Bank to enter into this Amendment, Borrower hereby represents and warrants to Bank as follows:

4.1.Immediately after giving effect to this Amendment (a) the representations and warranties contained in the Loan Documents are true, accurate and complete in all material respects as of the
date hereof (except to the extent such representations and warranties relate to an earlier date, in which case they are true and correct as of such date), and (b) no Event of Default has occurred and is continuing;

4.2.Borrower has the power and authority to execute and deliver this Amendment and to perform its obligations under the Loan
Agreement, as amended by this Amendment;

4.3.The organizational documents of Borrower delivered to Bank on the
Effective Date (including the Fifth Amended and Restated Certificate of Incorporation filed with the Delaware Secretary of State on November 20, 2007), as amended and supplemented by the Certificates of Amendment filed with the Delaware
Secretary of State on July 2, 2009 and July 9, 2010 and by the Certificate of Designations filed with the Delaware Secretary of State on September 29, 2010, remain true, accurate and complete and have not been amended, supplemented or
restated and are and continue to be in full force and effect;



---

4.4.The execution and delivery by Borrower of this Amendment and the performance by
Borrower of its obligations under the Loan Agreement, as amended by this Amendment, have been duly authorized;

4.5.The execution and delivery by Borrower of this Amendment and the performance by Borrower of its obligations under the Loan Agreement, as amended by this Amendment, do not and will not contravene (a) any law or regulation binding on or
affecting Borrower, (b) any contractual restriction with a Person binding on Borrower, (c) any order, judgment or decree of any court or other governmental or public body or authority, or subdivision thereof, binding on Borrower, or
(d) the organizational documents of Borrower;

4.6.The execution and delivery by Borrower of this Amendment and
the performance by Borrower of its obligations under the Loan Agreement, as amended by this Amendment, do not require any order, consent, approval, license, authorization or validation of, or filing, recording or registration with, or exemption by
any governmental or public body or authority, or subdivision thereof, binding on either Borrower, except as already has been obtained or made; and

4.7.This Amendment has been duly executed and delivered by Borrower and is the binding obligation of Borrower, enforceable against Borrower in accordance with its terms, except as such
enforceability may be limited by bankruptcy, insolvency, reorganization, liquidation, moratorium or other similar laws of general application and equitable principles relating to or affecting creditors rights.

5. Counterparts. This Amendment may be executed in any number of counterparts and all of such counterparts taken together shall be
deemed to constitute one and the same instrument.

6. Effectiveness. This Amendment shall be deemed effective upon the
execution and delivery of this Amendment by each party hereto.

[Signature page follows]



---

IN WITNESS WHEREOF,the parties hereto
have caused this Amendment to be duly executed and delivered as of the date first written above.



|                    |  |                      |  |                   |  |        |  |                                                  
|------------------- |  | -------------------- |  | ----------------- |  | ------ |  | -------------------------------------------------
|BANK                |  |                      |  | BORROWER         
|                    |  |                     
|Silicon Valley Bank |  |                      |  | Enteromedics Inc.
|                    |  |                      |  |                  
|By:                 |  | /s/ Benjaman Johnson |  |                   |  | By:    |  | /s/ Greg S. Lea                                  
|Name:               |  | Benjaman Johnson     |  |                   |  | Name:  |  | Greg S. Lea                                      
|Title:              |  | Deal Team Leader     |  |                   |  | Title: |  | Senior Vice President and Chief Financial Officer



---

EXHIBIT A TO FOURTH AMENDMENT

EXHIBIT B

COMPLIANCE CERTIFICATE



|      |  |                     |  |  |  |      
|----- |  | ------------------- |  |  |  | -----
|TO:   |  | SILICON VALLEY BANK |  |  |  | Date:
|      |  |                     | 
|FROM: |  | ENTEROMEDICS INC.   |  |  |  |      

The undersigned authorized officer of EnteroMedics Inc. (Borrower) certifies that
under the terms and conditions of the Loan and Security Agreement between Borrower and Bank (the Agreement), (1) Borrower is in complete compliance for the period ending
 with all required covenants except as noted below, (2) there are no Events of Default, (3) all representations and warranties in the Agreement are true and
correct in all material respects on this date except as noted below; provided, however, that such materiality qualifier shall not be applicable to any representations and warranties that already are qualified or modified by materiality in the text
thereof; and provided, further that those representations and warranties expressly referring to a specific date shall be true, accurate and complete in all material respects as of such date, (4) Borrower, and each of its Subsidiaries, has
timely filed all required tax returns and reports, and Borrower has timely paid all foreign, federal, state and local taxes, assessments, deposits and contributions owed by Borrower except as otherwise permitted pursuant to the terms of
Section 5.9 of the Agreement, and (5) no Liens have been levied or claims made against Borrower or any of its Subsidiaries relating to unpaid employee payroll or benefits of which Borrower has not previously provided written notification
to Bank. Attached are the required documents supporting the certification. The undersigned certifies that these are prepared in accordance with GAAP consistently applied from one period to the next except as explained in an accompanying letter or
footnotes. The undersigned acknowledges that no borrowings may be requested at any time or date of determination that Borrower is not in compliance with any of the terms of the Agreement, and that compliance is determined not just at the date this
certificate is delivered. Capitalized terms used but not otherwise defined herein shall have the meanings given them in the Agreement.

Please indicate compliance status by circling Yes/No under Complies column.



|                                                                                                                                                                              |  |                                     |  |          
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |  | ----------------------------------- |  | ---------
|REPORTING
COVENANT                                                                                                                                                            |  | REQUIRED                            |  | COMPLIES 
|                                                                                                                                                                              |  |                                    
|Monthly financial statements with Compliance Certificate                                                                                                                      |  | Monthly within 30 days              |  | Yes    No
|                                                                                                                                                                              |  |                                    
|Annual financial statement (CPA Audited)                                                                                                                                      |  | FYE within 150 days                 |  | Yes    No
|                                                                                                                                                                              |  |                                    
|Annual financial projections                                                                                                                                                  |  | 15 days prior to FYE                |  | Yes    No
|                                                                                                                                                                              |  |                                    
|10-Q, 10-K and 8-K                                                                                                                                                            |  | Within 5 days after filing with SEC |  | Yes    No
|                                                                                                                                                                              |  |                                    
|Reports per Agreement Schedule 2                                                                                                                                              |  | Monthly within 30 days              |  | Yes    No
|The following Intellectual Property was registered (or
an application for registration was made) after the Effective Date (if no registrations or applications, state None)



|                                   |  |               |  |           |  |          
|---------------------------------- |  | ------------- |  | --------- |  | ---------
|FINANCIAL
COVENANT                 |  | REQUIRED      |  | ACTUAL    |  | COMPLIES 
|                                   |  |               | 
|Maintain on a Monthly Basis:       |  |               |  |           |  |          
|                                   |  |               | 
|Liquidity Ratio (LR)             |  | 1.0:1.0       |  | _____:1.0 |  | Yes    No
|                                   |  |               | 
|EBITDA (if LR less than 1.5:1.0) |  | See Agreement |  | ________  |  | Yes    No



---

The following financial covenant analys[is][es] and information set forth in Schedule 1
attached hereto are true and accurate as of the date of this Certificate.

The following are the exceptions with respect to
the certification above: (If no exceptions exist, state No exceptions to note.)















|                  |  |  |  |               |  |                                     |  |  |  | 
|----------------- |  |  |  | ------------- |  | ----------------------------------- |  |  |  | 
|ENTEROMEDICS INC. |  |  |  | BANK USE ONLY |  |                                    
|                  |  |  |  |               | 
|                  |  |  |  |               |  | Received by:                        |  |  |  | 
|By:               |  |  |  |               |  | AUTHORIZED SIGNER                   |  | 
|                  |  |  |  |               | 
|Name:             |  |  |  |               |  | Date:                               |  |  |  | 
|                  |  |  |  |               | 
|Title:            |  |  |  |               |  | Verified:                           |  |  |  | 
|                  |  |  |  |               |  | AUTHORIZED SIGNER                   |  | 
|                  |  |  |  |               |  | Date:                               |  |  |  | 
|                  |  |  |  |              
|                  |  |  |  |               |  | Compliance Status:        Yes    No |  | 



---

SCHEDULE 1 TO COMPLIANCE CERTIFICATE

Financial Covenants of Borrower

In the event of a conflict between this Schedule and the Agreement, the terms of the Agreement shall govern.

Dated:

I. Liquidity Ratio (Section 6.7(a))

Required:
        not less than 1.00:1.00

Actual:



|   |  |                                                                                      |  |  |         | 
|-- |  | ------------------------------------------------------------------------------------ |  |  | ------- | 
|A. |  | Borrowers unrestricted cash (and Cash Equivalents) held with SVB and its Affiliates |  |  | $       | 
|   |  |                                                                                     
|B. |  | Borrowers Eligible Accounts                                                         |  |  | $       | 
|   |  |                                                                                     
|C. |  | The sum of line A plus line B                                                        |  |  | $       | 
|   |  |                                                                                     
|D. |  | Outstanding principal amount of the Term Loan                                        |  |  | $       | 
|   |  |                                                                                     
|E. |  | Liquidity Ratio (line C divided by line D)                                           |  |  | ___:___ | 



|                                                                       |  |                   
|---------------------------------------------------------------------- |  | ------------------
|Is line E greater than or equal to 1.00:1.00?                          |  |                   
|                                                                       | 
|No, not in
compliance                                                  |  | Yes, in compliance
|                                                                       | 
|II. Minimum EBITDA (Section 6.7(b))                                    |  |                   
|                                                                       | 
|Required:         as set forth in Section 6.7(b) of the Loan
Agreement |  |                   
|                                                                       | 
|Actual:                                                                |  |                   



|   |  |                                                           |  |  |        | 
|-- |  | --------------------------------------------------------- |  |  | ------ | 
|A. |  | Net Income                                                |  |  | $      | 
|   |  |                                                          
|B. |  | To the extent included in the determination of Net Income |  |  |        | 
|   |  |                                                          
|   |  | 1.        Interest Expense                                |  |  | $      | 
|   |  |                                                           |  |  |        | 
|   |  | 2.        Depreciation expense                            |  |  | $      | 
|   |  |                                                           |  |  |        | 
|   |  | 3.        Amortization expense                            |  |  | $      | 
|   |  |                                                           |  |  |        | 
|   |  | 4.        Income tax expense                              |  |  | $      | 
|   |  |                                                           |  |  |        | 
|   |  | 5.        The sum of lines 1 through 4                    |  |  | $      | 
|   |  |                                                          
|C. |  | EBITDA (line A plus line B.5)                             |  |  | ______ | 



|                                                                          |  |                   
|------------------------------------------------------------------------- |  | ------------------
|Does line C meet the requirement of Section 6.7(b) of the Loan Agreement?
|                                                                          | 
|No, not in
compliance                                                     |  | Yes, in compliance