<PAGE>
 
                           FIRST AMENDMENT TO LEASE
                           ------------------------
                                        
     This FIRST AMENDMENT TO LEASE (hereinafter, this "Amendment") dated as of
the 18th day of August, 1997, is by and between VINTAGE PARK TWO LIMITED
PARTNERSHIP, a Virginia limited partnership (hereinafter, "Landlord"); and
TEMPLATE SOFTWARE, INC., a Virginia corporation (hereinafter, "Tenant");

                             W I T N E S S E T H:
                                        
     WHEREAS, Landlord and Tenant did previously enter into that certain Lease
dated April 25, 1996 (hereinafter, the "Lease") relating to the demise of 40,452
rentable square feet of office space designated as Suite No. 100 in the building
known as Two Vintage Park, 45365 Vintage Park Plaza, Dulles, Virginia
(hereinafter, the "Leased Premises");

     WHEREAS, Tenant now desires to expand the Leased Premises to include the
7,227 and 2,456 rentable square feet on the second (2nd) floor as shown in
attached Exhibit A (hereinafter, the "Expansion Premises) as well as the 13,364
         ---------                                                             
rentable square feet shown in attached Exhibit B (hereinafter, the "Additional
                                       ---------                              
Expansion Premises"); and

     WHEREAS, Landlord is agreeable to amending the Lease, subject to the
following terms and conditions.

     NOW, THEREFORE, in consideration of the sum of TEN DOLLARS ($10.00) and
other valuable consideration, the receipt and sufficiency of which is hereby
acknowledged, the Lease is hereby amended as follows:

     1.  a.  EXPANSION OF LEASED PREMISES.  Modifying the provisions of Section
             ----------------------------                                      
1(a)(7) of the Lease, effective as of the earlier of the date Tenant
substantially completes the work required in the Expansion Premises under
Section 3 below or November 1, 1997 (hereinafter, the "Effective Date"), and co-
terminous with the Term, all references hereinafter and in the Lease to the
"Leased Premises" shall be deemed to include the Expansion Premises, subject to
all of the terms, covenants and conditions contained in the Lease, as modified
hereby.  As of the Effective Date, the Leased Premises shall consist of 50,135
rentable square feet (the original 40,452 plus an additional 9,683 rentable
square feet).

         b.  ADDITIONAL EXPANSION OF LEASED PREMISES:  Further modifying the
             ---------------------------------------                        
provisions of Section 1(a)(7) of the Lease, effective as of the earlier of the
date Tenant substantially completes the work required in the Additional
Expansion Premises under Section 3 below or sixty (60) days following the date
that the Additional Expansion Premises are vacated (hereinafter, the "Additional
Effective Date"), and co-terminous with the Term, all references hereinafter and
in the Lease to the "Leased Premises" shall be deemed to also include the
Additional Expansion Premises, subject to all of the terms, covenants and
conditions contained in the Lease, as modified hereby.  As of the Additional
Effective Date, the Leased Premises shall consist of 63,499) rentable square
feet (the aforementioned 50,135 plus an additional 13,364 rentable square feet).
If Landlord is unable to deliver actual possession of the 
<PAGE>
 
Additional Expansion Premises to Tenant by reason of the holding over or
retention of possession by the existing occupant, the Additional Effective Date
shall be extended for such period of time as may be reasonably necessary to
enable Landlord to evict such occupant and to deliver such possession of the
Additional Expansion Premises to Tenant, and Landlord's failure to deliver
possession shall not affect the validity of this Additional Expansion Premises
provision, the Lease or Tenant's obligations under the Lease as modified hereby.

     2.  a.  BASIC RENT.  Modifying the provisions of Section 1(a)(2)(A) of the
             ----------                                                        
Lease, from and after the Effective Date as relates to the Expansion Premises
and from and after the Additional Effective Date as relates to the Additional
Expansion Premises, Tenant shall pay annual Basic Rent for the Expansion
Premises and Additional Expansion Premises, respectively, net of electricity, at
the per rentable square foot rate in effect under said Section 1(a)(2)(A), as
adjusted annually thereunder each December 1st throughout the Term.

         b.  PROPORTIONATE SHARE.  Modifying the provisions of Section 1(a)(9)
             -------------------                                             
of the Lease, from and after the Effective Date, Tenant is Proportionate Share
shall be 61.6% and, from and after the Additional Effective Date, Tenant's
proportionate Share shall be 78.4%.

         c.  ELECTRICITY.  Modifying the provisions of Section 5(a)(1)(A) of the
             -----------                                                        
Lease, in connection with electricity for the Expansion Premises and the
Additional Expansion Premises, the provisions of said Section 5(a)(1)(A)
relating to electricity shall apply to the Expansion Premises and the Additional
Expansion Premises, including meter costs.

         d.  PARKING.  Modifying the provisions of Section 5(a)(8) of the Lease,
             -------                                                            
from and after the Effective Date, Tenant shall be entitled to an additional
thirty five (35) surface parking spaces at the Building, at no charge; and, from
and after the Additional Effective Date, Tenant shall be entitled to an
additional forty eight (48) surface parking spaces at the Building (including
the spaces currently reserved for U.S. Customs) at no charge.

     All rent and additional charges shall continue to be paid in the manner and
intervals required by the Lease.

     3.  a.  IMPROVEMENTS.  In connection with the Expansion Premises, Landlord
             ------------                                                      
shall provide Tenant with a prorata planning and construction allowance up to
eighteen dollars and thirty three cents ($18.33) per rentable square foot of the
Expansion Premises (i.e., $177,489.39) and an additional planning and
construction allowance up to eighteen dollars and thirty three cents ($18.33)
per rentable square foot of the Additional Expansion Premises (i.e.,
$255,962.12), for Tenant to diligently plan and complete construction of the
Expansion Premises and Additional Expansion Premises, respectively, all in
accordance with plans and specifications approved in advance and in writing by
Landlord (each such total planning and construction allowance to be referred to
herein as the "Construction Allowance").  Except as modified hereby, the
"Construction" and "Construction Procedures" provisions of Section 2(c) of
Exhibit B of the Lease shall apply to construction of the Expansion Premises,
the Additional Expansion Premises, and each Construction Allowance.  Immediately
upon full execution hereof, the parties agree to

                                       2
<PAGE>
 
cooperatively and diligently commence and complete plans for the Expansion
Premises and the Additional Expansion Premises.

         b.  SIGNAGE.  In connection with the Expansion Premises and the
             -------                                                           
Additional Expansion Premises, Tenant shall have the right to directory signage
and suite entry signage at Tenant's sole cost (or, if unused amounts remain
available, to be deducted from the aforesaid Construction Allowances).

         c.  KEYS.  In connection with each of the Expansion Premises and the
             ----                                                            
Additional Expansion Premises, Tenant shall be entitled to ten (10) Building
access keys and ten (10) keys to each entry of the Expansion Premises and the
Additional Expansion Premises, at no cost.

     4.  a.  ADVANCE DEPOSIT.  Upon its execution hereof, Tenant shall be
             ---------------                                             
required to post $12,910.67 (an amount equal to one (1) month's Basic Rent for
the Expansion Premises).  This Advance Deposit shall be applied to the initial
Basic Rent due hereunder, as due, for the Expansion Premises.

         b.  SECURITY DEPOSIT.  Upon its execution hereof, tenant shall also be
             ----------------                                                  
required to post $12,910.67 (an amount equal to one (1) month's Basic Rent for
the Expansion Premises) and Tenant shall also provide an additional $17,818.67
(an amount equal to one (1) month's Basic Rent for the Expansion Premises), to
be held as additional security Deposits pursuant to the terms of Section 18 of
the Lease.

     5.  RIGHT OF REFUSAL NOTICE.  Modifying the provisions of Section 1(a)7(B)
         -----------------------                                               
of the Lease, each reference therein to "five (5) days" shall be changed to "ten
(10) days."

     6.  SUPPLEMENTAL HVAC.  Modifying the provisions of Section 6 of the Lease,
         -----------------                                                      
from and after the Effective Date and throughout the remaining Term, Landlord
shall assume responsibility for the maintenance and repair (but not replacement)
of the supplemental HVAC unit currently installed on the first (1st) floor of
the Building currently under sublease to "WinStar."

     7.  SUCCESSORS AND ASSIGNS.  The terms and provisions of this Amendment
         ----------------------                                             
shall be binding upon and inure to the benefit of the parties hereto, their
successors and assigns.

     8.  CONFIRMATION OF LEASE.  Except as herein otherwise modified or amended,
         ---------------------                                                  
all of the terms, covenants and conditions of the Lease hare hereby ratified and
confirmed, and shall be and remain in full force and effect until the Lease
expires.  Words and phrases not otherwise defined herein shall have the meaning
ascribed to them in the Lease.

     WITNESS, the following signatures and seals are as of the day and year
first above written.

                                       3
<PAGE>
 
WITNESS:                      VINTAGE PARK TWO LIMITED PARTNERSHIP
                              By its general partner:
                              Lerner Enterprises Limited Partnership
                                By:  Taleco Partners, L.L.C.
                                     its sole General Partner

___________________________   By: /s/ Mark D. Lerner
                                  ----------------------------
                                  Mark D. Lerner
                                  Executive Vice President
                                                    (Landlord)



ATTEST:                       TEMPLATE SOFTWARE, INC.


___________________________   By: /s/ E. Linwood Pearce
                                  -----------------------------
Secretary                         E. Linwood Pearce
[corporate seal]                  Chief Executive Officer
                                                    (Tenant)

                                       4