Firebase is a mobile and web application development platform that provides various tools and services to developers, including a real-time database. If a Firebase database is publicly exposed, it means that anyone can access and manipulate the data stored in the database without any authentication or authorization.

The security impact of publicly exposing a Firebase database can be severe, as it can lead to the following security risks:

* Unauthorized access: Anyone can access the data in the database without authentication or authorization, which means that sensitive information stored in the database can be accessed by unauthorized users.
* Data tampering: Attackers can modify, add or delete data in the database, which can lead to data loss or inaccurate data, which can result in serious consequences for the application or business.
* Information disclosure: Attackers can access sensitive information such as passwords, personal information, financial data, and other confidential information that may be stored in the database.
* Malicious attacks: Attackers can launch various malicious attacks, such as injection attacks, cross-site scripting, and other types of attacks to exploit the vulnerabilities in the application that is connected to the Firebase database.
* Loss of reputation: If sensitive information is exposed, it can lead to a loss of trust and credibility among customers, which can have a significant impact on the reputation of the business.

To check if a Firebase database is publicly exposed, you can use the following curl command:

```shell
curl -X GET 'https://<project-id>.firebaseio.com/.json'
```

Replace `<project-id>` with the ID of the Firebase project you want to check. This command will attempt to retrieve the root node of the Firebase database in JSON format.

If the Firebase database is publicly exposed, you should be able to retrieve the data without any authentication or authorization.

If the database is secure and properly configured, you will receive an error message indicating that you are not authorized to access the data.