diff --git a/libpldm/bios.h b/libpldm/bios.h
index d316b67..b020dea 100644
--- a/libpldm/bios.h
+++ b/libpldm/bios.h
@@ -19,11 +19,13 @@
 #define PLDM_SET_BIOS_ATTR_CURR_VAL_MIN_REQ_BYTES 5
 #define PLDM_SET_BIOS_ATTR_CURR_VAL_RESP_BYTES 5
 #define PLDM_GET_BIOS_ATTR_CURR_VAL_BY_HANDLE_REQ_BYTES 7
+#define PLDM_GET_BIOS_ATTR_CURR_VAL_BY_HANDLE_MIN_RESP_BYTES 6
 
 enum pldm_bios_completion_codes {
 	PLDM_BIOS_TABLE_UNAVAILABLE = 0x83,
 	PLDM_INVALID_BIOS_TABLE_DATA_INTEGRITY_CHECK = 0x84,
 	PLDM_INVALID_BIOS_TABLE_TYPE = 0x85,
+	PLDM_INVALID_BIOS_ATTR_HANDLE = 0x88,
 };
 enum pldm_bios_commands {
 	PLDM_GET_BIOS_TABLE = 0x01,
diff --git a/libpldmresponder/base.cpp b/libpldmresponder/base.cpp
index b9f5ff1..4d0c4f9 100644
--- a/libpldmresponder/base.cpp
+++ b/libpldmresponder/base.cpp
@@ -26,7 +26,10 @@
      {PLDM_GET_TID, PLDM_GET_PLDM_VERSION, PLDM_GET_PLDM_TYPES,
       PLDM_GET_PLDM_COMMANDS}},
     {PLDM_PLATFORM, {PLDM_SET_STATE_EFFECTER_STATES}},
-    {PLDM_BIOS, {PLDM_GET_DATE_TIME}}};
+    {PLDM_BIOS,
+     {PLDM_GET_DATE_TIME, PLDM_GET_BIOS_TABLE,
+      PLDM_GET_BIOS_ATTRIBUTE_CURRENT_VALUE_BY_HANDLE}},
+};
 
 static const std::map<Type, ver32_t> versions{
     {PLDM_BASE, {0xF1, 0xF0, 0xF0, 0x00}},
diff --git a/libpldmresponder/bios.cpp b/libpldmresponder/bios.cpp
index e9ed628..bc663f6 100644
--- a/libpldmresponder/bios.cpp
+++ b/libpldmresponder/bios.cpp
@@ -103,6 +103,11 @@
                      [this](const pldm_msg* request, size_t payloadLength) {
                          return this->getBIOSTable(request, payloadLength);
                      });
+    handlers.emplace(PLDM_GET_BIOS_ATTRIBUTE_CURRENT_VALUE_BY_HANDLE,
+                     [this](const pldm_msg* request, size_t payloadLength) {
+                         return this->getBIOSAttributeCurrentValueByHandle(
+                             request, payloadLength);
+                     });
 }
 
 Response Handler::getDateTime(const pldm_msg* request, size_t /*payloadLength*/)
@@ -808,6 +813,49 @@
     return response;
 }
 
+Response Handler::getBIOSAttributeCurrentValueByHandle(const pldm_msg* request,
+                                                       size_t payloadLength)
+{
+    uint32_t transferHandle;
+    uint8_t transferOpFlag;
+    uint16_t attributeHandle;
+
+    auto rc = decode_get_bios_attribute_current_value_by_handle_req(
+        request, payloadLength, &transferHandle, &transferOpFlag,
+        &attributeHandle);
+    if (rc != PLDM_SUCCESS)
+    {
+        return ccOnlyResponse(request, rc);
+    }
+
+    fs::path attrValueTablePath(BIOS_TABLES_DIR);
+    attrValueTablePath /= attrValTableFile;
+    BIOSTable attributeValueTable(attrValueTablePath.c_str());
+
+    Response table;
+    attributeValueTable.load(table);
+
+    auto entry = pldm_bios_table_attr_value_find_by_handle(
+        table.data(), table.size(), attributeHandle);
+    if (entry == nullptr)
+    {
+        return ccOnlyResponse(request, PLDM_INVALID_BIOS_ATTR_HANDLE);
+    }
+
+    auto valueLength = pldm_bios_table_attr_value_entry_value_length(entry);
+    auto valuePtr = pldm_bios_table_attr_value_entry_value(entry);
+    Response response(sizeof(pldm_msg_hdr) +
+                          PLDM_GET_BIOS_ATTR_CURR_VAL_BY_HANDLE_MIN_RESP_BYTES +
+                          valueLength,
+                      0);
+    auto responsePtr = reinterpret_cast<pldm_msg*>(response.data());
+    encode_get_bios_current_value_by_handle_resp(
+        request->hdr.instance_id, PLDM_SUCCESS, 0, PLDM_START_AND_END, valuePtr,
+        valueLength, responsePtr);
+
+    return response;
+}
+
 namespace internal
 {
 
diff --git a/libpldmresponder/bios.hpp b/libpldmresponder/bios.hpp
index f9a3eff..41ac70c 100644
--- a/libpldmresponder/bios.hpp
+++ b/libpldmresponder/bios.hpp
@@ -67,6 +67,15 @@
      *  @param[return] Response - PLDM Response message
      */
     Response getBIOSTable(const pldm_msg* request, size_t payloadLength);
+
+    /** @brief Handler for GetBIOSAttributeCurrentValueByHandle
+     *
+     *  @param[in] request - Request message
+     *  @param[in] payloadLength - Request message payload length
+     *  @return Response - PLDM Response message
+     */
+    Response getBIOSAttributeCurrentValueByHandle(const pldm_msg* request,
+                                                  size_t payloadLength);
 };
 
 } // namespace bios
