SQL injection vulnerability in langchain before v0.0.247 allows a remote attacker to obtain sensitive information via the SQLDatabaseChain component.
### System Info

There is no safeguard in SQLDatabaseChain to prevent a malicious user from sending a prompt such as "Drop Employee table".

SQLDatabaseChain should have a facility to intercept and review the SQL before sending it to the database.

Creating this separately from https://github.com/hwchase17/langchain/issues/1026 because the SQL injection issue and the Python exec issues are separate. For example SQL injection cannot be solved with running inside an isolated container. 

[LangChain version: 0.0.194. Python version 3.11.1]

<img width="596" alt="image" src="https://github.com/hwchase17/langchain/assets/227187/3ced0139-490f-4e41-a880-71dc864ee12c">

### Who can help?

_No response_

### Information

- [ ] The official example notebooks/scripts
- [ ] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

Here is a repro using the Chinook sqlite database used in the example ipynb. Running this will drop the Employee table from the SQLite database.

```python
chinook_sqlite_uri = "sqlite:///Chinook_Sqlite_Tmp.sqlite"
from langchain import OpenAI, SQLDatabase, SQLDatabaseChain
llm = OpenAI(temperature=0)
db = SQLDatabase.from_uri(chinook_sqlite_uri)
db.get_usable_table_names()
db_chain = SQLDatabaseChain.from_llm(llm=llm, db=db, verbose=True)
db_chain.run("How many employees are there?")
db_chain.run("Drop the employee table")
```

### Expected behavior

LangChain should provide a mechanism to intercept SQL before sending it to the database. During this interception the SQL can be examined and rejected if it performs unsafe operations.
SQLDatabaseChain has SQL injection issue
This is a GitHub Issue
repo:langchain
owner:hwchase17
Title : SQLDatabaseChain has SQL injection issue
Issue date:

--- start body ---
### System Info

There is no safeguard in SQLDatabaseChain to prevent a malicious user from sending a prompt such as "Drop Employee table".

SQLDatabaseChain should have a facility to intercept and review the SQL before sending it to the database.

Creating this separately from https://github.com/hwchase17/langchain/issues/1026 because the SQL injection issue and the Python exec issues are separate. For example SQL injection cannot be solved with running inside an isolated container. 

[LangChain version: 0.0.194. Python version 3.11.1]

<img width="596" alt="image" src="https://github.com/hwchase17/langchain/assets/227187/3ced0139-490f-4e41-a880-71dc864ee12c">

### Who can help?

_No response_

### Information

- [ ] The official example notebooks/scripts
- [ ] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

Here is a repro using the Chinook sqlite database used in the example ipynb. Running this will drop the Employee table from the SQLite database.

```python
chinook_sqlite_uri = "sqlite:///Chinook_Sqlite_Tmp.sqlite"
from langchain import OpenAI, SQLDatabase, SQLDatabaseChain
llm = OpenAI(temperature=0)
db = SQLDatabase.from_uri(chinook_sqlite_uri)
db.get_usable_table_names()
db_chain = SQLDatabaseChain.from_llm(llm=llm, db=db, verbose=True)
db_chain.run("How many employees are there?")
db_chain.run("Drop the employee table")
```

### Expected behavior

LangChain should provide a mechanism to intercept SQL before sending it to the database. During this interception the SQL can be examined and rejected if it performs unsafe operations.
--- end body ---
