EXHIBIT 3.7 STOCK PLEDGE AND SECURITY AGREEMENT THIS STOCK PLEDGE AND SECURITY AGREEMENT (the "Agreement") is dated and effective as of the 24th day of May, 2002, by and between Carrizo Oil & Gas, Inc., a Texas corporation (the "Grantor"), and Hibernia National Bank, a national banking association ( the "Lender"), who agree as follows: RECITALS A. The Grantor, CCBM, Inc., a Delaware corporation, and the Lender are the parties to that certain Credit Agreement of even date herewith. B. Pursuant to the Credit Agreement, the Grantor has agreed to enter into and execute this Agreement. AGREEMENT NOW, THEREFORE, in consideration of the premises, the Grantor and the Lender do hereby agree and obligate themselves as follows: SECTION 1. DEFINITIONS. Any capitalized term defined in the Credit Agreement and not otherwise defined herein shall have the meaning given to such term in the Credit Agreement. In addition, the following terms shall have the following meanings when used in this Agreement: AGREEMENT. The term "Agreement" refers to this Stock Pledge and Security Agreement as this agreement may be modified, restated, or amended in writing from time to time, and to any exhibits or attachments to this Agreement. BORROWER. The term "Borrower" refers individually, collectively and interchangeably to Carrizo Oil & Gas, Inc., a Texas corporation, and its successors and assigns. CCBM. The term "CCBM" means CCBM, Inc., a Delaware corporation, and its successors and assigns. COLLATERAL. The term "Collateral" refers individually, collectively and interchangeably to the Collateral as more fully described in Section 2 (A) of this Agreement. CREDIT AGREEMENT. The term "Credit Agreement" means that certain Credit Agreement dated as of May 24, 2002 by and among Grantor, CCBM, and the Lender, as the same may hereafter be amended, modified, and/or restated from time to time and in effect. Stock Pledge and Security Agreement -- Page 1 of 10 GRANTOR. The term "Grantor" means Carrizo Oil & Gas, Inc., a Texas corporation, and its successors and assigns. INDEBTEDNESS. The term "Indebtedness" refers individually, collectively and interchangeably to (i) the present and future indebtedness, obligations, and liabilities of Borrower arising under the Credit Agreement, including the Loans, and the Revolving Note, as well as any future renewals, modifications, or extensions to any one or more of the Loans and/or Revolving Note, and (ii) all present and future indebtedness, obligations and liabilities of Borrower to the Lender, or any affiliate of any Lender, arising under or in connection with Rate Management Transactions. This Agreement covers future advances. LENDER. The term "Lender" refers Hibernia National Bank and if applicable, and any bank or banks that become a signatory party to the Credit Agreement in the future. SECTION 2. SECURITY INTEREST. (A) To secure the full and punctual payment and performance of all present and future Indebtedness to the Lender or any successor or transferee thereof, the Grantor hereby pledges, pawns, transfers and grants to the Lender a continuing security interest in and to all of the following property of the Grantor, whether now owned or existing or hereafter acquired or arising (collectively the "Collateral"): 1000 shares of the capital stock of CCBM represented by Certificate No. 1, dated June 29, 2001, registered in the Grantor's name, together with any additional shares of stock issued by CCBM to the Grantor hereafter as stock dividends, stock splits or otherwise, or shares received as a result of any merger or consolidation of CCBM, all cash, liquidation and other dividends now or hereafter declared thereon, all stock redemption payments and all other monies due or to become due thereunder, all stock warrants, options, pre-emptive rights, rights of first refusal, and other rights to subscribe to, purchase or receive any shares of common stock or other securities now or hereafter incident thereto or declared or granted in connection therewith, and all distributions (whether made in cash, instruments, income, or other property) made or to be made in connection therewith or incident thereto, and all proceeds of all or any of the foregoing, in whatever form, and all proceeds of such proceeds. (B) The security interest is granted as security only and shall not subject the Lender to, or transfer or in any way affect or modify, any obligation or liability of the Grantor with respect to any of the Collateral or any transaction in connection therewith. Stock Pledge and Security Agreement -- Page 2 of 10 SECTION 3. DELIVERY OF COLLATERAL. The Lender hereby accepts the delivery of the Collateral on behalf of itself and on behalf of any future transferee of the Indebtedness. The Grantor will execute and deliver to the Lender all assignments, endorsements, powers and other documents reasonably requested at any time and from time to time by the Lender with respect to the Collateral and the rights and powers granted to the Lender hereunder, and will deliver to the Lender any stock certificates representing stock dividends on, or stock splits of, any of the Collateral, together with a stock power fully executed in blank. SECTION 4. REPRESENTATIONS. The Grantor has not performed any acts or signed any agreements which might prevent the Lender from enforcing any of the terms of this Agreement or which would limit any of them in any such enforcement. No security agreement or similar or equivalent document or instrument covering all or any part of the Collateral has been executed by the Grantor and remains in effect. No Collateral is in the possession of any Person (other than the Grantor) asserting any claim thereto or security interest therein, except that the Lender or its designee may have possession of Collateral as contemplated hereby. The Grantor further represents and warrants as follows: (a) There are no outstanding options, warrants or similar rights with respect to the Collateral; (b) The Grantor has the full power and authority to grant to the Lender a valid and enforceable perfected and continuing lien on and security interest in the Collateral pursuant to this Agreement; (c) The Collateral delivered to the Lender is fully paid and non-assessable, duly and validly authorized and issued and, upon execution hereof, will be duly and validly pledged to the Lender in accordance with all provisions of applicable law; (d) The Grantor has good and marketable title to, and is the legal and registered owner of, the Collateral, free and clear of all liens, except for the security interest created pursuant to this Agreement; (e) Upon the execution and delivery of this Agreement and the delivery to the Lender of the Collateral, the Lender shall have a valid and enforceable lien on and security interest in and to the Collateral; such lien and security interest shall constitute a perfected security interest in such Collateral, superior to the rights and equitable interests of all other persons in the Collateral; (f) The execution, delivery and performance of this Agreement by the Grantor and the granting of a valid and enforceable lien and security interest in the Collateral will not (i) violate any provision of any law, any judgment, order, rule or regulation of any court, arbitration panel, or other governmental authority, domestic or foreign, or other person, (ii) violate any provision of any indenture, agreement, mortgage, contract or other instrument to which the Grantor is a party or by which any of its properties, assets or revenues are bound, or be in conflict with, result in an acceleration of any obligation or a breach of or constitute (with notice or lapse of time or both) a default under, any such indenture, agreement, mortgage, contract or other Stock Pledge and Security Agreement -- Page 3 of 10 instrument, or (iii) result in the creation or imposition of any lien on any of the properties, assets or revenues of the Grantor, except those in favor of the Lender as provided herein. (g) This Agreement has been duly executed and delivered by the Grantor and constitutes the legal, valid and binding obligation of the Grantor enforceable against it in accordance with its terms; (h) No registration with or consent or approval of, or other action by, any governmental authority, domestic or foreign, or other person is required (other than such approvals or consents which may have been obtained) in connection with the execution, delivery and performance of this Agreement and the granting of the valid and enforceable lien and security interest in the Collateral in favor of the Lender; (i) The Collateral constitutes not less than 100% of the issued and outstanding stock of CCBM; (j) The Grantor represents and warrants that until the Lender's security interest in the Collateral is terminated by the Lender, that the Collateral shall at all times constitute not less than 100% of the issued and outstanding stock of CCBM. To the extent necessary, the Grantor agrees that it shall not approve or authorize any issuance of capital stock by CCBM if such issuance would reduce the Collateral below the 100% calculation mentioned in the preceding sentence; and (k) The Grantor represents and warrants that it is a corporation duly organized under the laws of its state of incorporation. As of the date hereof, Grantor's mailing address and the location of is its principal place of business (if it only has one) or its chief executive office (if it has more than one place of business) is at 14701 St. Mary's Lane, Suite 800, Houston, TX 77079. Grantor also represents and warrants that it has not conducted business under any name except the name in which it has executed this Agreement, which is the exact name as it appears in the Grantor's organizational documents, as amended, as filed with the Grantor's jurisdiction of organization. Grantor represents and warrants that its Federal employer identification number is 76-0415919. Grantor agrees that it will notify Lender in writing should Grantor ever change its name, legal status, or change or obtain a new Federal employer identification number. Grantor further agrees to notify Lender in writing of any change in Grantor's mailing address or the location of Grantor's principal office. SECTION 5. VOTING RIGHTS. (A) So long as no Event of Default (as such term is defined in the Credit Agreement) shall have occurred and be continuing, the Grantor shall have the right, from time to time, to exercise voting and other consensual rights to give approvals, ratifications and waivers pertaining to the Collateral, and the Lender upon receiving a written request from the Grantor accompanied by a certificate stating that no Event of Default has occurred will deliver to the Grantor (or as specified in such request) such proxies, approvals, ratifications, waivers and other instruments pertaining to the Collateral as may be specified in such request and be in form and substance satisfactory to the Lender. Stock Pledge and Security Agreement -- Page 4 of 10 (B) Upon the occurrence and during the continuance of an Event of Default, the Lender shall have the right, at the Lender's option, to exercise the voting and other consensual rights to give approvals, ratifications and waivers and to take any other action with respect to all the Collateral with the same force and effect as if the Lender were the absolute and sole owner thereof, and the Grantor's right to exercise such voting and other consensual rights shall, at the Lender's option, cease and become vested in the Lender. SECTION 6. REMEDIES UPON DEFAULT. (A) Upon the occurrence and during the continuance of an Event of Default (as such term is defined in the Credit Agreement) the Lender may exercise all rights of a secured party under the Uniform Commercial Code-Secured Transactions and other applicable law (including the Uniform Commercial Code as in effect from time to time in any applicable jurisdiction) and, in addition, the Lender may, without being required to give any notice, except as herein provided or as may be required by mandatory provisions of law, (i) transfer the whole or any part of the Collateral into the name of Lender or its nominee(s); (ii) sell the Collateral or any part thereof at a broker's board or on a securities exchange; or (iii) sell the Collateral or any part thereof at public or private sale, for cash, upon credit or for future delivery, and at such price or prices as the Lender may deem satisfactory. The Lender may be the purchaser of any or all of the Collateral so sold at any public sale (or, if the Collateral is of a type customarily sold in a recognized market or is of a type which is the subject of widely distributed standard price quotations, at any private sale). The Grantor will execute and deliver such documents and take such other action as the Lender deems necessary or advisable in order that any such sale may be made in compliance with law. Upon any such sale the Lender shall have the right to deliver, assign and transfer to the purchaser thereof the Collateral so sold. Each purchaser at any such sale shall hold the Collateral so sold to it absolutely and free from any claim or right of whatsoever kind, including any equity or right of redemption of the Grantor which may be waived, and the Grantor, to the extent permitted by law, hereby specifically waives all rights of redemption, stay or appraisal which it has or may have under any law now existing or hereafter adopted. The Grantor agrees that ten (10) days' prior written notice of the time and place of any sale or other intended disposition of any of the Collateral constitutes "reasonable notification" within the meaning of Section 9-504(3) of the Uniform Commercial Code (or any successor provision from time to time in effect) except that shorter or no notice shall be reasonable as to any Collateral which is perishable or threatens to decline speedily in value or is of a type customarily sold on a recognized market. The notice (if any) of such sale shall (1) in case of a public sale, state the time and place fixed for such sale, and (2) in the case of a private sale, state the day after which such sale may be consummated. Any such public sale shall be held at such time or times within ordinary business hours and at such place or places as the Lender may fix in the notice of such sale. At any such sale the Collateral may be sold in one lot as an entirety or in separate parcels, as the Lender may determine. The Lender shall not be obligated to make any such sale pursuant to any such notice. The Lender may, without notice or publication, adjourn any public or private sale or cause the same to be adjourned from time to time by announcement at the time and place fixed for the sale, and such sale may be made at any time or place to which the same may be so adjourned. In case of any sale of all or any part of the Collateral on credit or for future delivery, the Collateral so sold may be retained by the Lender until the selling price is paid by the purchaser thereof, but the Lender shall not incur any liability in case of the failure of such purchaser to take up and pay for the Collateral so sold and, in case of any such failure, such Collateral may again be sold upon like notice. Stock Pledge and Security Agreement -- Page 5 of 10 (B) The Lender, instead of exercising the power of sale herein conferred upon it, may proceed by a suit or suits at law or in equity to foreclose the security interests and sell the Collateral, or any portion thereof, under a judgment or decree of a court or courts of competent jurisdiction. For the purposes of Louisiana executory process procedures, the Grantor does hereby confess judgment in favor of the Lender for the full amount of the Indebtedness. The Grantor does by these presents consent, agree and stipulate that upon the occurrence of an Event of Default it shall be lawful for the Lender, and the Grantor does hereby authorize the Lender, to cause all and singular the Collateral to be seized and sold under executory or ordinary process, at the Lender's sole option, without appraisement, appraisement being hereby expressly waived, as an entirety or in parcels as the Lender may determine, to the highest bidder, and otherwise exercise the rights, powers and remedies afforded herein and under applicable Louisiana law. For the purposes of Louisiana executory process procedures, any and all declarations of fact made by authentic act before a Notary Public in the presence of two witnesses by a person declaring that such facts lie within his knowledge shall constitute authentic evidence of such facts for the purpose of executory process. The Grantor hereby waives in favor of the Lender: (a) the benefit of appraisement as provided in Louisiana Code of Civil Procedure Articles 2332, 2336, 2723 and 2724, and all other laws conferring the same; (b) the demand and three days' delay accorded by Louisiana Code of Civil Procedure Articles 2639 and 2721; (c) the notice of seizure required by Louisiana Code of Civil Procedure Articles 2293 and 2721; (d) the three days' delay provided by Louisiana Code of Civil Procedure Articles 2331 and 2722; and (e) the benefit of the other provisions of Louisiana Code of Civil Procedure Articles 2331, 2722 and 2723, not specifically mentioned above. (C) The Grantor recognizes that the Lender may be unable to effect a public sale of all or part of the Collateral by reason of certain prohibitions contained in the Securities Act of 1933, as amended, and applicable state securities laws but may be compelled to resort to one or more private sales to a restricted group of purchasers who will be obligated to agree, among other things, to acquire all or a part of the Collateral for their own account, for investment, and not with a view to the distribution or resale thereof. If the Lender deems it advisable to do so for the foregoing or for other reasons, the Lender is authorized to limit the prospective bidders on or purchasers of any of the Collateral to such a restricted group of purchasers and may cause to be placed on certificates for any or all of the Collateral a legend to the effect that such security has not been registered under the Securities Act of 1933, as amended, and may not be disposed of in violation of the provision of said act, and to impose such other limitations or conditions in connection with any such sale as the Lender deems necessary or advisable in order to comply with said act or any other securities or other laws. The Grantor acknowledges and agrees that any private sale so made may be at prices and on other terms less favorable to the seller than if such Collateral were sold at public sale and that the Lender has no obligation to delay the sale of such Collateral for the period of time necessary to permit the registration of such Collateral for public sale under any securities laws. The Grantor agrees that a private sale or sales made under the foregoing circumstances shall be deemed to have been made in a commercially reasonable manner. If any consent, approval, or authorization of any federal, state, municipal or other governmental department, agency or authority should be necessary to effectuate any sale or other disposition of the Collateral, or any partial sale or other disposition of the Collateral, the Grantor will execute all applications and other instruments as may be required in connection with securing any such consent, approval or authorization and will Stock Pledge and Security Agreement -- Page 6 of 10 otherwise use its best efforts to secure same. In addition, if the Collateral is disposed of pursuant to Rule 144, the Grantor agrees to complete and execute a Form 144, or comparable successor form, at the Lender's request; and the Grantor agrees to provide any material adverse information in regard to the current and prospective operations of any corporation whose stock constitutes all or a portion of the Collateral of which the Grantor has knowledge and which has not been publicly disclosed, and the Grantor hereby acknowledges that the Grantor's failure to provide such information may result in criminal and/or civil liability. (D) In addition, to the extent permitted by applicable law, the Grantor hereby unconditionally and irrevocably authorizes and instructs CCBM, upon the occurrence and continuance of an Event of Default, to transfer record ownership of the Collateral to the Lender. Notice of said occurrence and continuance of an Event of Default to CCBM shall be the issuance of a written notification thereof by the Lender to CCBM. (E) Application of Proceeds. All payments received by the Lender hereunder shall be applied by the Lender to payment of the Indebtedness in the following order unless a court of competent jurisdiction shall otherwise direct: (i) FIRST, to payment of all costs and expenses of the Lender incurred in connection with the collection and enforcement of the Indebtedness or of any security interest granted to the Lender in connection with any collateral securing the Indebtedness; (ii) SECOND, to payment of that portion of the Indebtedness constituting accrued and unpaid interest and fees, to the Lender and its affiliates in accordance with the amount of such accrued and unpaid interest and fees owing to each of them; (iii) THIRD, to payment of the principal outstanding under the Revolving Note and any amount due by the Grantor to Lender (or any affiliate of Lender) under Rate Management Transactions (to the extent constituting Indebtedness); and (iv) FOURTH, to payment of any remaining Indebtedness. SECTION 7. LIMITATION ON DUTY. Beyond the exercise of reasonable care in the custody thereof, the Lender shall have no duty as to any Collateral in its possession or control or in the possession or control of any Lender or bailee or any income thereon. The Lender shall be deemed to have exercised reasonable care in the custody of the Collateral in its possession if the Collateral is accorded treatment substantially equal to that which it accords its own property, and shall not be liable or responsible for any loss or damage to any of the Collateral, or for any diminution in the value thereof, by reason of the act or omission of any broker or other Lender or bailee selected by the Lender in good faith. The Lender shall be deemed to have exercised reasonable care with respect to any of the Collateral in its possession if the Lender takes such action for that purpose as the Grantor shall reasonably request in writing; but no failure to comply with any such request shall, of itself, be deemed a failure to exercise reasonable care. Stock Pledge and Security Agreement -- Page 7 of 10 SECTION 8. APPOINTMENT OF AGENT. At any time or times, in order to comply with any legal requirement in any jurisdiction, the Lender may appoint a bank or trust company or one or more other Persons with such power and authority as may be necessary for the effectual operation of the provisions hereof and may be specified in the instrument of appointment. SECTION 9. REVISED ARTICLE 9. Grantor hereby confirms that by signing this Agreement, that Grantor has authenticated this Agreement, within the meaning of revised Chapter 9 of the Uniform Commercial Code-Secured Transactions (La. R.S. 10:9-101 et seq.) and Revised Article 9 of the Uniform Commercial Code as now or hereafter in effect in any jurisdiction ("Revised Article 9"). This Agreement shall constitute full authorization in favor of the Agent to file appropriate financing statements, initial or "in lieu" financing statements, continuation statements, and statements of amendment, with or without Grantor's signature, as may be necessary or advisable to perfect and maintain the perfection and priority of the security interest granted to the Lender in this Agreement, including any such filings containing such information required by Part 5 of Revised Article 9 for the sufficiency or filing office acceptance of any financing statement, continuation statement or amendment, including whether Grantor is an organization, the type of organization and any organization number issued to the Grantor. Grantor shall furnish such information to Lender upon Lender's request. Any such financing statements, continuation statements or amendments may be signed by Lender on Grantor's behalf. Any such filings by an Lender may be by delivery of originals or photocopies, by electronic communication, or such other authorized form of communication as may be permitted under then SECTION 10. EXPENSES. In the event that the Grantor fails to comply with any provisions of the Credit Agreement or this Agreement, such that the value of any Collateral or the validity, perfection, rank or value of any security interest hereunder is thereby diminished or potentially diminished or put at risk, the Lender may upon reasonable prior notice, but shall not be required to, effect such compliance on behalf of the Grantor, and the Grantor shall reimburse the Lender for the costs thereof on demand. All insurance expenses and all expenses of protecting, storing, appraising, preparing for sale, handling, maintaining and shipping the Collateral, any and all excise, property, sales, and use taxes imposed by any federal, state or local authority on any of the Collateral, all expenses in respect of periodic appraisals and inspections of the Collateral to the extent the same may be reasonably requested from time to time, and all expenses in respect of the sale or other disposition thereof shall be borne and paid by the Grantor, and if the Grantor fails to promptly pay any portion thereof when due, the Lender may, at its option, but shall not be required to, pay the same and charge the Grantor's account therefor, and the Grantor agrees to reimburse the Lender therefor on demand. All sums so paid or incurred by the Lender for any of the foregoing and any and all other sums for which the Grantor may become liable hereunder and all costs and expenses (including reasonable attorneys' fees, legal expenses and court costs) incurred by the Lender in enforcing or protecting any of the rights or remedies under this Agreement, together with interest thereon until paid at the rate equal the then highest rate of interest charged on the principal of any of the Indebtedness due under the Revolving Note plus one percent (1%), shall be additional Indebtedness hereunder and the Grantor agrees to pay all of the foregoing sums promptly on demand. Stock Pledge and Security Agreement -- Page 8 of 10 SECTION 11. TERMINATION. Upon the payment in full of the Indebtedness, the termination of the Credit Agreement (and all obligations of the Lender thereunder), the termination of all Lender's obligations to extend Loans to the Borrower, the termination of all Rate Management Transactions (to the extent constituting Indebtedness), and the payment of all Rate Management Transaction obligations (to the extent constituting Indebtedness), this Agreement shall terminate. Upon request of the Grantor, the Lender shall deliver the remaining Collateral (if any) to the Grantor. SECTION 12. NOTICES. Any notice or demand which, by provision of this Agreement, is required or permitted to be given or served to the Grantor, the Lender, and/or CCBM shall be deemed to have been sufficiently given and served for all purposes if made in accordance with the Credit Agreement. SECTION 13. AMENDMENT. Neither this Agreement nor any provisions hereof may be changed, waived, discharged or terminated orally or in any manner other than by an instrument in writing signed by the party against whom enforcement of the change, waiver, discharge or termination is sought. SECTION 14. WAIVERS. No course of dealing on the part of the Lender, its officers, employees, consultants or agent, nor any failure or delay by the Lender with respect to exercising any of its rights, powers or privileges under this Agreement shall operate as a waiver thereof. SECTION 15. CUMULATIVE RIGHTS. The rights and remedies of the Lender under this Agreement shall be cumulative and the exercise or partial exercise of any such right or remedy shall not preclude the exercise of any other right or remedy. SECTION 16. TITLES OF SECTIONS. All titles or headings to sections of this Agreement are only for the convenience of the parties and shall not be construed to have any effect or meaning with respect to the other content of such sections, such other content being controlling as to the agreement between the parties hereto. SECTION 17. GOVERNING LAW. This Agreement is a contract made under and shall be construed in accordance with and governed by the laws of the United States of America and the State of Louisiana. SECTION 18. SUCCESSORS AND ASSIGNS. All covenants and agreements made by or on behalf of the Grantor in this Agreement shall bind Grantor's successors and assigns and shall inure to the benefit of the Lender and its successors and assigns. This Agreement is for the benefit of the Lender and for such other Person or Persons as may from time to time become or be the holders of any of the Indebtedness, and this Agreement shall be transferable with the same force and effect and to the same extent as the Indebtedness may be transferable, it being understood that, upon the transfer or assignment by the Lender of any of the Indebtedness, the legal holder of such Indebtedness shall have all of the rights granted to the Lender under this Agreement. Grantor specifically agrees that upon any transfer of the Indebtedness, the Lender may transfer and deliver the Collateral to the transferee of such Indebtedness and the Collateral shall secure any and all of the Indebtedness in favor of such a transferee, that such transfer of the Collateral shall not affect the Stock Pledge and Security Agreement -- Page 9 of 10 priority and ranking thereof, and that the Collateral shall secure with retroactive rank the then existing Indebtedness of the Grantor to the transferee and any and all Indebtedness thereafter arising. After any such transfer has taken place, the Lender shall be fully discharged from any and all future liability and responsibility to the Grantor with respect to the Collateral and the transferee thereafter shall be vested with all the powers, rights and duties with respect to the Collateral. SECTION 19. COUNTERPARTS. This Agreement may be executed in two or more counterparts, and it shall not be necessary that the signatures of all parties hereto be contained on any one counterpart hereof, each counterpart shall be deemed an original, but all of which when taken together shall constitute one and the same instrument. IN WITNESS WHEREOF, the Grantor and the Lender have caused this Agreement to be duly executed as of the date first above written. GRANTOR: CARRIZO OIL & GAS, INC. By: ---------------------------------------- Name: Frank Wojtek Title: Vice President and Chief Financial Officer LENDER: HIBERNIA NATIONAL BANK By: ---------------------------------------- Name: David R. Reid Title: Senior Vice President Stock Pledge and Security Agreement -- Page 10 of 10