<PAGE>
                                                                   EXHIBIT 10.21

                       SECOND LOAN MODIFICATION AGREEMENT

      This Second Loan Modification Agreement (this "Loan Modification
Agreement") is entered into as of December 20, 2002, by and between SILICON
VALLEY BANK, a California-chartered bank, with its principal place of business
at 3003 Tasman Drive, Santa Clara, California 95054 and with a loan production
office located at One Newton Executive Park, Suite 200, 2221 Washington Street,
Newton, Massachusetts 02462, doing business under the name "Silicon Valley East"
("Bank") and ART TECHNOLOGY GROUP, INC., a Delaware corporation with its
principal place of business at 25 First Street, Cambridge, Massachusetts 02141
("Borrower").

1. DESCRIPTION OF EXISTING INDEBTEDNESS AND OBLIGATIONS. Among other
indebtedness and obligations which may be owing by Borrower to Bank, Borrower is
indebted to Bank pursuant to a loan arrangement dated as of June 13, 2002,
evidenced by, among other documents, a certain Amended and Restated Loan and
Security Agreement dated as of June 13, 2002, between Borrower and Bank, as
amended by a certain First Loan Modification Agreement dated as of September 17,
2002, as further amended by a certain Amendment dated as of____________ , 2002
(as amended, the "Loan Agreement"). Capitalized terms used but not otherwise
defined herein shall have the same meaning as in the Loan Agreements.

2. DESCRIPTION OF COLLATERAL. Repayment of the Obligations is secured by the
Collateral as described in the Loan Agreement (together with any other
collateral security granted to Bank, the "Security Documents").

Hereinafter, the Security Documents, together with all other documents
evidencing or securing the Obligations shall be referred to as the "Existing
Loan Documents".

3. DESCRIPTION OF CHANGE IN TERMS.

      Modifications to Loan Agreement.

            1.    The Loan Agreement shall be amended by deleting the following
                  text, appearing in Section 2.1.1 (a) thereof, in its entirety:

                        "(a) Availability. Bank shall make Advances not
                        exceeding (i) the Committed Revolving Line or the
                        Borrowing Base, whichever is less, minus (ii) the amount
                        of all outstanding Letters of Credit (including drawn
                        but unreimbursed Letters of Credit), minus (iii) the FX
                        Reserve, and minus (iv) the aggregate outstanding
                        Advances hereunder (including any Cash Management
                        Services). Amounts borrowed under this Section may be
                        repaid and reborrowed during the term of this
                        Agreement."

                  and inserting in lieu thereof the following:

                        "(a) Availability. Bank shall make Advances not
                        exceeding (i) the Committed Revolving Line, minus (ii)
                        the amount of all outstanding Letters of Credit
                        (including drawn but unreimbursed Letters of Credit),
                        minus (iii) the FX Reserve, and minus (iv) the aggregate
                        outstanding Advances hereunder (including any Cash
                        Management Services). Amounts borrowed under this
                        Section may be repaid and reborrowed during the term of
                        this Agreement"

            2.    The Loan Agreement shall be amended by deleting the following
                  text, appearing as the first two sentences in Section 2.1.2
                  (a) thereof in its entirety;

                        "Bank shall issue or have issued Letters of Credit for
                        Borrower's account not exceeding (i) the lesser of the
                        Committed Revolving Line or the Borrowing Base minus
                        (ii) the outstanding principal balance of any Advances
                        (including any Cash Management Services), minus (iii)
                        the amount of all Letters of Credit (including
<PAGE>
                        drawn but unreimbursed Letters of Credit), plus an
                        amount equal to any Letter of Credit Reserves. The face
                        amount of outstanding Letters of Credit (including drawn
                        but unreimbursed Letters of Credit and any Letter of
                        Credit Reserve) issued under this Agreement may not
                        exceed $15,000,000.00."

                  and inserting in lieu thereof the following:

                        "Bank shall issue or have issued Letters of Credit for
                        Borrower's account not exceeding (i) the Committed
                        Revolving Line minus (ii) the outstanding principal
                        balance of any Advances (including any Cash Management
                        Services), minus (iii) the amount of all Letters of
                        Credit (including drawn but unreimbursed Letters of
                        Credit), plus an amount equal to any Letter of Credit
                        Reserves. The face amount of outstanding Letters of
                        Credit (including drawn but unreimbursed Letters of
                        Credit and any Letter of Credit Reserve) issued under
                        this Agreement may not exceed $20,000,000.00."

            3.    The Loan Agreement shall be amended by deleting the amount of
                  $15,000,000.00" appearing in both Sections 2.1.3 and Section
                  2.1.4 thereof and inserting in lieu thereof "$20,000,000.00".

            4.    The Loan Agreement shall be amended by adding the following
                  new Section 2.4 (d):

                  "(d) Unused Line Fee. In the event, in any calendar quarter,
                  the average daily principal balance of the Advances
                  outstanding during the quarter is less than $20,000,000.00,
                  Borrower shall pay Bank an unused line fee in an amount equal
                  to 0.25% per annum on the difference between $20,000,000.00
                  and the average daily principal balance of the Advances
                  outstanding during the quarter, which unused line fee shall be
                  computed and paid quarterly, in arrears, on the first of the
                  following quarter"

            5.    The Loan Agreement shall be amended by adding the following
                  new Section 2.4 (e):

                  "(e) Compensating Balance/Compensating Balances Fees. In the
                  event, at any time, Borrower maintains less than $27,000,000
                  in unrestricted cash with Bank, of which at least $3,000,000
                  shall be maintained in Borrower's sweep account (account no.
                  3300070667) at Bank, Borrower shall pay such fees and expenses
                  as Bank shall determine, in its sole and exclusive discretion,
                  to compensate Bank for its loss on income on such deposit
                  balance (the "Additional Fees"). Such Additional Fees may be
                  instituted by Bank by, among other ways, (i) an increase in
                  the interest rate then in effect with respect to the Advances,
                  (ii) an increase in the Letter of Credit Fee, (iii) charging
                  of additional facility fees and other fees, or any combination
                  of the foregoing and other methods, all at Bank's option and
                  in its sole and exclusive discretion in each instance.
                  Notwithstanding the foregoing, Bank shall provide Borrower a
                  one-time five (5) Business Day notice period prior to
                  instituting the Additional Fees in order to provide Borrower
                  an opportunity to deposit additional unrestricted cash with
                  the Bank."

            6.    The Loan Agreement shall be amended by deleting the following
                  text, appearing as the third sentence in Section 4.1 thereof,
                  in its entirety:

                        "Bank may place a "hold" on any deposit account pledged
                        as Collateral."

                  and inserting in lieu thereof the following:

                        "After the occurrence of an Event of Default, Bank may
                        place a "hold" on any deposit account pledged as
                        Collateral"
<PAGE>
            7.    The Loan Agreement shall be amended by deleting Section 6.2(b)
                  thereof in its entirety

            8.    The Loan Agreement shall be amended by deleting the following
                  text, appearing in Section 6.6 thereof, in its entirety:

                        "6.6 PRIMARY ACCOUNTS. In order to permit the Bank to
                        monitor the Borrower's financial performance and
                        condition, Borrower shall maintain its primary domestic
                        depository and operating accounts with Bank. Borrower
                        shall maintain at least $18,000,000 in unrestricted cash
                        (subject to the proviso below) with Bank at all times
                        during the term of this Agreement, provided, however,
                        Borrower may use up to $3,000,000 of such amount to
                        secure letters of credit. Borrower shall identify " to
                        Bank, in writing, of any bank or securities account
                        opened by Borrower with any institution other than Bank.
                        In addition, for each such account that the Borrower at
                        any time opens or maintains, Borrower shall, at the
                        Bank's request and option, pursuant to an agreement in
                        form and substance acceptable to the Bank, cause the
                        depositary bank or securities intermediary to agree that
                        such account is the collateral of the Bank pursuant to
                        the terms hereunder. The provisions of this paragraph
                        shall not apply to deposit accounts exclusively used for
                        payroll, payroll taxes and other employee wage and
                        benefit payments to or for the benefit of the Borrower's
                        employees'

                  and inserting in lieu thereof the following:

                        "6.6 PRIMARY ACCOUNTS. In order to permit the Bank to
                        monitor the Borrower's financial performance and
                        condition, Borrower shall maintain its primary domestic
                        depository and operating accounts with Bank. Borrower
                        shall identify to Bank, in writing, any bank or
                        securities account opened by Borrower with any
                        institution other than Bank. In addition, for each such
                        account that the Borrower at any time opens or
                        maintains, Borrower shall, at the Bank's request and
                        option pursuant to an agreement in form and substance
                        acceptable to the Bank, cause the depositary bank or
                        securities intermediary to agree that such account is
                        the collateral of the Bank pursuant to the terms
                        hereunder. The provisions of this paragraph shall not
                        apply to deposit accounts exclusively used for payroll,
                        payroll taxes paid other employee wage and benefit
                        payments to or for the benefit of the Borrower's
                        employees."

            9.    The Loan Agreement shall be amended by deleting the following
                  text, appearing in Section 6.7(a) thereof, in its entirety;

                        "(a) LIQUIDITY COVERAGE. Borrower shall have at all
                        times, to be tested as of the last day of each month,
                        unrestricted and unencumbered cash equal to or greater
                        than the product of (A) all Obligations (including the
                        stated amount of any issued but undrawn Letters of
                        Credit) hereunder multiplied by (B) two (2.0)."

                  and inserting in lieu thereof the following:

                        "(a) LIQUIDITY. Borrower shall have at all times, to be
                        tested as of the last day of each month, unrestricted
                        and unencumbered cash equal to or greater than
                        $40,000,000.00."

            10.   The Loan Agreement shall be amended by deleting the following
                  texts appearing in Section 6.7(b) thereof, in its entirety:

                        (b) PROFITABILITY. Borrower shall have quarterly net
                        losses of not more than (i) $40,000,000.00 for the
                        quarter ending December 31, 2001 (excluding all non-
<PAGE>
                        cash write off of deferred tax assets); (ii)
                        $7,000,000.00 for the quarter ending March 31, 2002;
                        (iii) $6,000,000.00 for the quarter ending June 30,
                        2002; (iv) $4,000,000.00 for the quarter ending
                        September 30, 2002; and (v) $2,000,000.00 for each
                        quarter thereafter.

                  and inserting in lieu thereof the following:

                        "(b) PROFITABILITY. Borrower shall have quarterly net
                        losses of not more than (i) $4,500,000.00 for the
                        quarter ending December 31, 2002; (ii) $4,000,000.00 for
                        the quarter ending March 31, 2003; (iii) $2,000,000.00
                        for the quarter ending June 30, 2003: (iv) $1,000,000.00
                        for each quarter thereafter. In calculating Borrower's
                        profitability hereunder, Bank will exclude a
                        restructuring charge not to exceed $25,000,000 in the
                        aggregate (of which (x) not more than $7,500,000 will be
                        used for non-lease cash obligations payable within
                        twelve months and (y) not more than $12,000,000 will be
                        used for cash payments for lease termination obligations
                        payable within twelve months), which restructuring
                        charge may be taken by Borrower in each of or any of)
                        the quarters ending December 31, 2002, March 31, 2003,
                        June 30, 2003 and September 30, 2003."

            11.   The Loan Agreement shall be amended by deleting in their
                  entirety the definitions of "Borrowing Base", "Eligible
                  Accounts" and "Eligible Foreign Accounts", each appearing in
                  Section 13 thereof.

            12.   The Loan Agreement shall be amended by deleting the following
                  definition appearing in Section 1 3 thereof, in its entirety:

                        "COMMITTED REVOLVING LINE" is an Advance or Advances of
                        up to Fifteen Million Dollars ($15,000,000.00)."

                  and inserting in lieu thereof the following:

                        "COMMITTED REVOLVING LINE" is an Advance or Advances of
                        up to Twenty Million Dollars ($20,000,000.00)."

            13.   The Loan Agreement shall be amended by deleting the following
                  definition appearing in Section 13 thereof, in its entirety:

                        "REVOLVING MATURITY DATE" is December 27, 2002."

                  and inserting in Lieu thereof the following:

                        "REVOLVING MATURITY DATE" is December 26, 2003."

            14.   The Compliance Certificate appearing as EXHIBIT D to the Loan
                  Agreement is hereby replaced with the Compliance Certificate
                  attached as EXHIBIT A hereto.

4. FEES. Borrower shall pay to Bank a modification fee equal to Seventy Thousand
Dollars ($70,000.00), which fee shall be due on the date hereof and shall be
deemed fully earned as of the date hereof. The Borrower shall also reimburse
Bank for all reasonable legal fees and expenses incurred in connection with this
amendment to the Existing Loan Documents.

5. RATIFICATION OF INTELLECTUAL PROPERTY SECURITY AGREEMENT. Borrower hereby
ratifies, confirms and reaffirms, all and singular, the terms and conditions of
a certain Intellectual Property Security Agreement dated as of December 29, 2000
between Borrower and Bank, and acknowledges, confirms and agrees that said
intellectual Property Security Agreement contains an accurate and complete
listing of all Intellectual Property Collateral
<PAGE>
as defined in said Intellectual Property Security Agreement, shall remain in
full force and effect.

6. RATIFICATION OF PERFECTION CERTIFICATE. Borrower hereby ratifies, confirms
and reaffirms, all and singular, the terms and disclosures contained in a
certain Perfection Certificate dated as of June 13, 2002 between Borrower and
Bank, and acknowledges, confirms and agrees the disclosures and information
Borrower provided to Bank in said Perfection Certificate has not changed, as of
the date hereof.

7. CONSISTENT CHANGES. The Existing Loan Documents are hereby amended wherever
necessary to reflect the changes described above,

8. RATIFICATION OF LOAN DOCUMENTS. Borrower hereby ratifies, confirms, and
reaffirms all terms and conditions of all security or other collateral granted
to the Bank, and confirms that the indebtedness secured thereby includes,
without limitation, the Obligations.

9. NO DEFENSES OF BORROWER. Borrower agrees that, as of this date, it has no
defenses against the obligations to pay any amounts under the Obligations.

10. CONTINUING VALIDITY. Borrower understands and agrees that in modifying the
existing Obligations, Bank is relying upon Borrowers representations,
warranties, and agreements, as set forth in the Existing Loan Documents. Except
as expressly modified pursuant to this Loan Modification Agreement, the terms of
the Existing Loan Documents remain unchanged and in full force and effect.
Bank's agreement to modifications to the existing Obligations pursuant to this
Loan Modification Agreement in no way shall obligate Bank to make any future
modifications to the Obligations. Nothing in this Loan Modification Agreement
shall constitute a satisfaction of the Obligations. It is the intention of Bank
and Borrower to retain as liable parties all makers of Existing Loan Documents,
unless the party is expressly released by Bank in writing. No maker will be
released by virtue of this Loan Modification Agreement.

11. JURISDICTION/VENUE. Borrower accepts for itself and in connection with its
properties, unconditionally, the exclusive jurisdiction of any state or federal
court of competent jurisdiction in the Commonwealth of Massachusetts in any
action, suit, or proceeding of any kind against it which arises out of or by
reason of this Loan Modification Agreement; provided, however, that if for any
reason Bank cannot avail itself of the courts of the Commonwealth of
Massachusetts, then venue shall lie in Santa Clara County, California.
NOTWITHSTANDING THE FOREGOING, THE BANK SHALL HAVE THE RIGHT TO BRING ANY ACTION
OR PROCEEDING AGAINST THE BORROWER OR ITS PROPERTY IN THE COURTS Of ANY OTHER
JURISDICTION WHICH THE BANK DEEMS NECESSARY OR APPROPRIATE IN ORDER TO REALIZE
ON THE COLLATERAL OR TO OTHERWISE ENFORCE THE BANK'S RIGHTS AGAINST THE BORROWER
OR ITS PROPERTY.

12. COUNTERSIGNATURE. This Loan Modification Agreement shall become effective
only when it shall have been executed by Borrower and Bank (provided, however,
in no event shall this Loan Modification Agreement become effective until signed
by an officer of Bank in California).

            [The remainder of this page is intentionally left blank]
<PAGE>
      This Loan Modification Agreement is executed as a sealed instrument under
the laws of the Commonwealth of Massachusetts as of the date first written
above.

BORROWER:                               BANK:

ART TECHNOLOGY GROUP, INC.              SILICON VALLEY BANK, doing business as
                                        SILICON VALLEY EAST

By:                                     By:
    ------------------------------          ------------------------------

Name:                                   Name:
      ----------------------------            ----------------------------

Title:                                  Title:
      ----------------------------            ----------------------------


                                        SILICON VALLEY BANK

                                        By:
                                            ------------------------------

                                        Name:
                                              ----------------------------

                                        Title:
                                              ----------------------------
                                      (signed in Santa Clara County, California)
<PAGE>
                                    EXHIBIT A
                             COMPLIANCE CERTIFICATE

TO:   SILICON VALLEY BANK

FROM: ART TECHNOLOGY GROUP, INC.

      The undersigned authorized officer of ART TECHNOLOGY GROUP, INC. certifies
that under the terms and conditions of the Amended and Restated Loan and
Security Agreement between Borrower and Bank (the "Agreement"), (i) Borrower is
in complete compliance for the period ending ________________ with all required
covenants except us noted below and (ii) all representations and warranties in
the Agreement are true and correct in all material respects on this date.
Attached are the required documents supporting the certification. The Officer
certifies that these are prepared in accordance with Generally Accepted
Accounting Principles (GAAP) consistently applied from one period to the next
except as explained in an accompanying letter or footnotes. The Officer
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.

      PLEASE INDICATE COMPLIANCE STATUS BY CIRCLING YES/NO UNDER "COMPLIES"
COLUMN

<TABLE>
<CAPTION>
          REPORTING COVENANT                   REQUIRED                   COMPLIES
          ------------------                   --------                   --------

<S>                                            <C>                        <C>
      Monthly financial statements with CC     Monthly within 30 days     Yes   No
      Quarterly financial statements with CC   Quarterly within 45 days   Yes   No
      Annual (CPA Audited)                     FYE within 120 days        Yes   No

      FINANCIAL COVENANT                       REQUIRED     ACTUAL
      ------------------                       --------     ------

      Maintain on a Monthly Basis:             $*           $_____        Yes   No
      Minimum Liquidity

      Maintain on a Quarterly Basis:           $**          $_____        Yes   No
      Profitability:
</TABLE>

* See Section 6.7(a) of the Agreement

** See Section 6.7(b) of the Agreement

COMMENTS REGARDING EXCEPTIONS: SEE ATTACHED.

Sincerely,


--------------------------------------------
SIGNATURE


--------------------------------------------
TITLE


--------------------------------------------
DATE

--------------------------------------------------------------------------------
                                  BANK USE ONLY

Received by:
             ------------------------------------------
                                AUTHORIZED SIGNER

Date:
      -------------------------------------------------


Verified:
         ----------------------------------------------
                                AUTHORIZED SIGNER

Date:
      -------------------------------------------------

--------------------------------------------------------------------------------